Package org.apache.giraph.graph

Examples of org.apache.giraph.graph.GiraphJob.run()


            SimpleMutateGraphVertex.SimpleMutateGraphVertexWorkerContext.class);
        job.setVertexInputFormatClass(SimplePageRankVertexInputFormat.class);
        job.setVertexOutputFormatClass(SimplePageRankVertexOutputFormat.class);
        Path outputPath = new Path("/tmp/" + getCallingMethodName());
        removeAndSetOutput(job, outputPath);
        assertTrue(job.run(true));
    }
}
View Full Code Here


                                       Long.parseLong(argArray[2]));
        job.setWorkerConfiguration(Integer.parseInt(argArray[3]),
                                   Integer.parseInt(argArray[3]),
                                   100.0f);

        return job.run(true) ? 0 : -1;
    }

    public static void main(String[] args) throws Exception {
        System.exit(ToolRunner.run(new SimpleShortestPathsVertex(), args));
    }
View Full Code Here

        job.setWorkerConfiguration(5, 5, 100.0f);
        job.getConfiguration().setBoolean(GiraphJob.SPLIT_MASTER_WORKER, true);
        job.setVertexClass(SimpleSuperstepVertex.class);
        job.setVertexInputFormatClass(SimpleSuperstepVertexInputFormat.class);
        try {
            job.run(true);
            assertTrue(false);
        } catch (IllegalArgumentException e) {
        }

        job.getConfiguration().setBoolean(GiraphJob.SPLIT_MASTER_WORKER, false);
View Full Code Here

        } catch (IllegalArgumentException e) {
        }

        job.getConfiguration().setBoolean(GiraphJob.SPLIT_MASTER_WORKER, false);
        try {
            job.run(true);
            assertTrue(false);
        } catch (IllegalArgumentException e) {
        }
        job.setWorkerConfiguration(1, 1, 100.0f);
        job.run(true);
View Full Code Here

            job.run(true);
            assertTrue(false);
        } catch (IllegalArgumentException e) {
        }
        job.setWorkerConfiguration(1, 1, 100.0f);
        job.run(true);
    }

    /**
     * Run a sample BSP job in JobTracker, kill a task, and make sure
     * the job fails (not enough attempts to restart)
View Full Code Here

        job.getConfiguration().setInt("mapred.map.max.attempts", 1);
        job.setVertexClass(SimpleFailVertex.class);
        job.setVertexInputFormatClass(SimplePageRankVertexInputFormat.class);
        Path outputPath = new Path("/tmp/" + getCallingMethodName());
        removeAndSetOutput(job, outputPath);
        assertTrue(!job.run(true));
    }

    /**
     * Run a sample BSP job locally and test supersteps.
     *
 
View Full Code Here

        }
        if (cmd.hasOption('s')) {
            getConf().setInt(SUPERSTEP_COUNT,
                             Integer.parseInt(cmd.getOptionValue('s')));
        }
        if (job.run(isVerbose) == true) {
            return 0;
        } else {
            return -1;
        }
    }
View Full Code Here

        job.setVertexClass(SimpleSuperstepVertex.class);
        job.setVertexInputFormatClass(SimpleSuperstepVertexInputFormat.class);
        job.setVertexOutputFormatClass(SimpleSuperstepVertexOutputFormat.class);
        Path outputPath = new Path("/tmp/" + getCallingMethodName());
        removeAndSetOutput(job, outputPath);
        assertTrue(job.run(true));
        if (getJobTracker() == null) {
            FileStatus fileStatus = getSinglePartFileStatus(job, outputPath);
            assertTrue(fileStatus.getLen() == 49);
        }
    }
View Full Code Here

            throws IOException, InterruptedException, ClassNotFoundException {
        GiraphJob job = new GiraphJob(getCallingMethodName());
        setupConfiguration(job);
        job.setVertexClass(SimpleMsgVertex.class);
        job.setVertexInputFormatClass(SimpleSuperstepVertexInputFormat.class);
        assertTrue(job.run(true));
    }


    /**
     * Run a sample BSP job locally with no vertices and make sure
View Full Code Here

        setupConfiguration(job);
        job.getConfiguration().setLong(GeneratedVertexReader.READER_VERTICES,
                                       0);
        job.setVertexClass(SimpleMsgVertex.class);
        job.setVertexInputFormatClass(SimpleSuperstepVertexInputFormat.class);
        assertTrue(job.run(true));
    }

    /**
     * Run a sample BSP job locally with combiner and checkout output value.
     *
 
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.