bspJob.getConfiguration().setWorkerContextClass( SimpleCheckpointVertexWorkerContext.class); bspJob.getConfiguration().setMasterComputeClass( SimpleCheckpointVertexMasterCompute.class); int minWorkers = Integer.parseInt(cmd.getOptionValue('w'));
conf.setMasterComputeClass( (Class<? extends MasterCompute>) Class .forName(cmd.getOptionValue("mc")));
conf.setMasterComputeClass(BlockMasterCompute.class); conf.setComputationClass(BlockComputation.class); conf.setWorkerContextClass(BlockWorkerContext.class);
private void addPrivateConfiguration(GiraphConfiguration configuration) { // Set currently fixed classes. TODO: Allow configuration at some point perhaps configuration.setComputationClass(io.arabesque.computation.ExecutionEngine.class); configuration.setMasterComputeClass(io.arabesque.computation.MasterExecutionEngine.class); configuration.setVertexInputFormatClass(ArabesqueInputFormat.class); // Calculate partition count based on # of workers and # of threads if no count was provided if (GiraphConstants.USER_PARTITION_COUNT.get(configuration) == -1) { int numWorkers = configuration.getMinWorkers(); int numComputeThreads = configuration.getNumComputeThreads(); GiraphConstants.USER_PARTITION_COUNT.set(configuration, numWorkers * numComputeThreads); } // Set our default worker context class instead of Giraph's default if (GiraphConstants.WORKER_CONTEXT_CLASS.get(configuration).equals(DefaultWorkerContext.class)) { configuration.setWorkerContextClass(WorkerContext.class); } }
@Override protected void prepareConfiguration(GiraphConfiguration conf, CommandLine cmd) { conf.setComputationClass(ReducersBenchmarkComputation.class); conf.setMasterComputeClass(ReducersBenchmarkMasterCompute.class); conf.setVertexInputFormatClass(PseudoRandomVertexInputFormat.class); conf.setWorkerContextClass(ReducersBenchmarkWorkerContext.class); conf.setLong(PseudoRandomInputFormatConstants.AGGREGATE_VERTICES, BenchmarkOption.VERTICES.getOptionLongValue(cmd)); conf.setLong(PseudoRandomInputFormatConstants.EDGES_PER_VERTEX, 1); conf.setInt(REDUCERS_NUM, REDUCERS.getOptionIntValue(cmd)); conf.setInt("workers", conf.getInt(GiraphConstants.MAX_WORKERS, -1)); }
@Override protected void prepareConfiguration(GiraphConfiguration conf, CommandLine cmd) { conf.setComputationClass(AggregatorsBenchmarkComputation.class); conf.setMasterComputeClass(AggregatorsBenchmarkMasterCompute.class); conf.setVertexInputFormatClass(PseudoRandomVertexInputFormat.class); conf.setWorkerContextClass(AggregatorsBenchmarkWorkerContext.class); conf.setLong(PseudoRandomInputFormatConstants.AGGREGATE_VERTICES, BenchmarkOption.VERTICES.getOptionLongValue(cmd)); conf.setLong(PseudoRandomInputFormatConstants.EDGES_PER_VERTEX, 1); conf.setInt(AGGREGATORS_NUM, AGGREGATORS.getOptionIntValue(cmd)); conf.setInt("workers", conf.getInt(GiraphConstants.MAX_WORKERS, -1)); MasterLoggingAggregator.setUseMasterLoggingAggregator(true, conf); }
@Override protected void prepareConfiguration(GiraphConfiguration conf, CommandLine cmd) { conf.setComputationClass(RandomMessageComputation.class); conf.setVertexInputFormatClass(PseudoRandomVertexInputFormat.class); conf.setWorkerContextClass(RandomMessageBenchmarkWorkerContext.class); conf.setMasterComputeClass(RandomMessageBenchmarkMasterCompute.class); conf.setLong(PseudoRandomInputFormatConstants.AGGREGATE_VERTICES, BenchmarkOption.VERTICES.getOptionLongValue(cmd)); conf.setLong(PseudoRandomInputFormatConstants.EDGES_PER_VERTEX, BenchmarkOption.EDGES_PER_VERTEX.getOptionLongValue(cmd)); conf.setInt(SUPERSTEP_COUNT, BenchmarkOption.SUPERSTEPS.getOptionIntValue(cmd)); conf.setInt(RandomMessageBenchmark.NUM_BYTES_PER_MESSAGE, BYTES_PER_MESSAGE.getOptionIntValue(cmd)); conf.setInt(RandomMessageBenchmark.NUM_MESSAGES_PER_EDGE, MESSAGES_PER_EDGE.getOptionIntValue(cmd)); if (FLUSH_THREADS.optionTurnedOn(cmd)) { conf.setInt(GiraphConstants.MSG_NUM_FLUSH_THREADS, FLUSH_THREADS.getOptionIntValue(cmd)); } }