Examples of CoordinatorHarness


Examples of org.apache.pig.penny.impl.harnesses.CoordinatorHarness

   
    SimpleCoordinator sc;

    public void startup() throws Exception {
        sc = new SimpleCoordinator();
        ch = new CoordinatorHarness(sc);
        mah1 = new MonitorAgentHarness(new SimpleMonitorAgent(), new LogicalLocation("L1"), new InetSocketAddress("127.0.0.1", CoordinatorHarness.MASTER_LISTEN_PORT),
                logicalIds, empty, l2, l3, null, null);
        mah1.initialize();
        mah2 = new MonitorAgentHarness(new SimpleMonitorAgent(), new LogicalLocation("L2"), new InetSocketAddress("127.0.0.1", CoordinatorHarness.MASTER_LISTEN_PORT),
                logicalIds, l1, empty, l3, null, null);
View Full Code Here

Examples of org.apache.pig.penny.impl.harnesses.CoordinatorHarness

    private final static String pennyJarFilename = System.getProperty("PENNY_JAR", "penny.jar");
  // Ibis change : end
   
    public static Object launch(PigContext pigContext, LogicalPlan queryPlan, ClassWithArgs coordinatorClass) throws Exception {
        Coordinator coord = (Coordinator) coordinatorClass.theClass().newInstance();
        CoordinatorHarness coordHarness = new CoordinatorHarness(coord);
        coord.init(coordinatorClass.args());
        ToolsPigServer pigServer = new ToolsPigServer(pigContext);
       
        if (!(new File(pennyJarFilename)).exists()) {
            throw new RuntimeException("Cannot find " + pennyJarFilename + " in working directory.");
        }
        pigServer.registerJar(pennyJarFilename);

        pigServer.runPlan(queryPlan, "penny");
        return coordHarness.finish();
    }
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.