Examples of MapReduceLauncher


Examples of org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher

    public ExecJob execute(PhysicalPlan plan,
                           String jobName) throws ExecException {
        try {
            FileSpec spec = ExecTools.checkLeafIsStore(plan, pigContext);

            MapReduceLauncher launcher = new MapReduceLauncher();
            boolean success = launcher.launchPig(plan, jobName, pigContext);
            if(success)
                return new HJob(ExecJob.JOB_STATUS.COMPLETED, pigContext, spec);
            else
                return new HJob(ExecJob.JOB_STATUS.FAILED, pigContext, null);
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher

            printer.visit();
            stream.println();

            ExecTools.checkLeafIsStore(plan, pigContext);

            MapReduceLauncher launcher = new MapReduceLauncher();
            launcher.explain(plan, pigContext, stream);
        } catch (Exception ve) {
            throw new RuntimeException(ve);
        }
    }
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher

        return pp;
    }

    private boolean executePlan(PhysicalPlan pp) throws IOException {
        boolean failed = true;
        MapReduceLauncher launcher = new MapReduceLauncher();
        PigStats stats = null;
        try {
            stats = launcher.launchPig(pp, "execute", myPig.getPigContext());
        } catch (Exception e) {
            e.printStackTrace(System.out);
            throw new IOException(e);
        }
        Iterator<JobStats> iter = stats.getJobGraph().iterator();
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher

        System.out.println("===== check map-reduce plan =====");

        MapRedUtil.checkLeafIsStore(pp, myPig.getPigContext());
       
        MapReduceLauncher launcher = new MapReduceLauncher();

        MROperPlan mrp = null;

        try {
            java.lang.reflect.Method compile = launcher.getClass()
                    .getDeclaredMethod("compile",
                            new Class[] { PhysicalPlan.class, PigContext.class });

            compile.setAccessible(true);
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher

    }

    public static MROperPlan buildMRPlanWithOptimizer(PhysicalPlan pp, PigContext pc) throws Exception {
        MapRedUtil.checkLeafIsStore(pp, pc);

        MapReduceLauncher launcher = new MapReduceLauncher();

        java.lang.reflect.Method compile = launcher.getClass()
                .getDeclaredMethod("compile",
                        new Class[] { PhysicalPlan.class, PigContext.class });

        compile.setAccessible(true);
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher

        buildLp.setAccessible(true);
        return (LogicalPlan ) buildLp.invoke( pig );
    }
   
    public static MROperPlan getMRPlan(PhysicalPlan pp, PigContext ctx) throws Exception {
        MapReduceLauncher launcher = new MapReduceLauncher();
        java.lang.reflect.Method compile = launcher.getClass()
                .getDeclaredMethod("compile",
                        new Class[] { PhysicalPlan.class, PigContext.class });
        compile.setAccessible(true);
        return (MROperPlan) compile.invoke(launcher, new Object[] { pp, ctx });
    }
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher

        }
    }
   
    private void submit() throws Exception{
        assertEquals(true, FileLocalizer.fileExists(hadoopLdFile, pc));
        MapReduceLauncher mrl = new MapReduceLauncher();
        mrl.launchPig(php, grpName, pc)
    }
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher

            currDAG.lp.explain(lps, format, verbose);

            pp.explain(pps, format, verbose);
           
            MapRedUtil.checkLeafIsStore(pp, pigContext);
            MapReduceLauncher launcher = new MapReduceLauncher();
            launcher.explain(pp, pigContext, eps, format, verbose);

            if (markAsExecute) {
                currDAG.markAsExecuted();
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher

     * @return The PigStats object
     * @throws ExecException
     * @throws FrontendException
     */
    protected PigStats launchPlan(PhysicalPlan pp, String jobName) throws ExecException, FrontendException {
        MapReduceLauncher launcher = new MapReduceLauncher();
        PigStats stats = null;
        try {
            stats = launcher.launchPig(pp, jobName, pigContext);
        } catch (Exception e) {
            // There are a lot of exceptions thrown by the launcher.  If this
            // is an ExecException, just let it through.  Else wrap it.
            if (e instanceof ExecException){
                throw (ExecException)e;
            } else if (e instanceof FrontendException) {
                throw (FrontendException)e;
            } else {
                int errCode = 2043;
                String msg = "Unexpected error during execution.";
                throw new ExecException(msg, errCode, PigException.BUG, e);
            }
        } finally {
            launcher.reset();
        }
       
        for (OutputStats output : stats.getOutputStats()) {
            if (!output.isSuccessful()) {
                POStore store = output.getPOStore();
View Full Code Here

Examples of org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher

            currDAG.lp.explain(lps, format, verbose);

            pp.explain(pps, format, verbose);

            MapRedUtil.checkLeafIsStore(pp, pigContext);
            MapReduceLauncher launcher = new MapReduceLauncher();
            launcher.explain(pp, pigContext, eps, format, verbose);

            if (markAsExecute) {
                currDAG.markAsExecuted();
            }
        } catch (Exception e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.