int minWorkers = Integer.parseInt(cmd.getOptionValue('w')); int maxWorkers = Integer.parseInt(cmd.getOptionValue('w')); bspJob.getConfiguration().setWorkerConfiguration( minWorkers, maxWorkers, 100.0f);
giraphConf.addMasterObserverClass(LogVersions.class); giraphConf.setWorkerConfiguration(workers, workers, 100.0f); prepareConfiguration(giraphConf, cmd);
final String computationClassName, final int workers) throws ClassNotFoundException, IOException { conf.setWorkerConfiguration(workers, workers, 100.0f); if (cmd.hasOption("typesHolder")) { Class<? extends TypesHolder> typesHolderClass =
@Override public int run(String[] args) throws Exception { if (args.length != 2) { throw new IllegalArgumentException( "run: Must have 2 arguments <output path> <# of workers>"); } GiraphJob job = new GiraphJob(getConf(), getClass().getName()); job.getConfiguration().setComputationClass(SimpleComputation.class); job.getConfiguration().setVertexInputFormatClass( SimpleSuperstepVertexInputFormat.class); job.getConfiguration().setWorkerContextClass(EmitterWorkerContext.class); job.getConfiguration().set( SimpleVertexWithWorkerContext.OUTPUTDIR, args[0]); job.getConfiguration().setWorkerConfiguration(Integer.parseInt(args[1]), Integer.parseInt(args[1]), 100.0f); if (job.run(true)) { return 0; } else { return -1; } }
File zkMgrDir = FileUtils.createTempDir(tmpDir, "_defaultZkManagerDir"); conf.setWorkerConfiguration(1, 1, 100.0f); GiraphConstants.SPLIT_MASTER_WORKER.set(conf, false); GiraphConstants.LOCAL_TEST_MODE.set(conf, true);
conf.setWorkerConfiguration(1, 1, 100.0f); GiraphConstants.SPLIT_MASTER_WORKER.set(conf, false); GiraphConstants.LOCAL_TEST_MODE.set(conf, true);
conf.setWorkerConfiguration(1, 1, 100.0f); GiraphConstants.SPLIT_MASTER_WORKER.set(conf, false); GiraphConstants.LOCAL_TEST_MODE.set(conf, true);