src/main/java/science/atlarge/graphalytics/giraph/GiraphJob.java
/**
	 * Creates a new Giraph job configuration and loads it with generic options
	 * such as input and output paths, the number of workers, and the worker
	 * heap size. It sets the computation and I/O format classes based on
	 * the return value of their respective hooks. The configure method is called
	 * to allow for job-specific configuration. Finally, the Giraph job is
	 * submitted and is executed (blocking).
	 *
	 * @param args ignored
	 * @return zero iff the job completed successfully
	 */
Creates a new Giraph job configuration and loads it with generic options
such as input and output paths, the number of workers, and the worker
heap size. It sets the computation and I/O format classes based on
the return value of their respective hooks. The configure method is called
to allow for job-specific configuration. Finally, the Giraph job is
submitted and is executed (blocking).

@param args ignored
@return zero iff the job completed successfully
Creates a new Giraph job configuration and loads it with generic options such as input and output paths the number of workers and the worker heap size . It sets the computation and I / O format classes based on the return value of their respective hooks . The configure method is called to allow for job - specific configuration . Finally the Giraph job is submitted and is executed ( blocking ) . @param args ignored @return zero iff the job completed successfully
@Override
	public final int run(String[] args) throws Exception {
		loadConfiguration();
		GiraphConfiguration configuration = new GiraphConfiguration(getConf());
		configuration.setComputationClass(getComputationClass());
		GiraphFileInputFormat.addVertexInputPath(configuration, new Path(vertexInputPath));
		GiraphFileInputFormat.addEdgeInputPath(configuration, new Path(edgeInputPath));
		configuration.setVertexInputFormatClass(getVertexInputFormatClass());
		configuration.setEdgeInputFormatClass(getEdgeInputFormatClass());
		configuration.set(FileOutputFormat.OUTDIR, outputPath);
		if (getVertexOutputFormatClass() != null) {
			configuration.setVertexOutputFormatClass(getVertexOutputFormatClass());
		} else {
			configuration.setEdgeOutputFormatClass(getEdgeOutputFormatClass());
		}
		configuration.setWorkerConfiguration(workerCount, workerCount, 100.0f);
		configuration.setZooKeeperConfiguration(zooKeeperAddress);
		configuration.setInt("mapreduce.map.memory.mb", workerMemory);
		FacebookConfiguration.MAPPER_MEMORY.set(configuration, workerHeap / 1024);
		FacebookConfiguration.MAPPER_CORES.set(configuration, workerCores);
		FacebookConfiguration.CONFIGURE_JAVA_OPTS.set(configuration, true);
		new FacebookConfiguration().configure(configuration);
		configuration.set("mapreduce.map.java.opts", configuration.get("mapred.child.java.opts"));
		TRACK_JOB_PROGRESS_ON_CLIENT.set(configuration, false);
		configure(configuration);
		org.apache.giraph.job.GiraphJob job = new org.apache.giraph.job.GiraphJob(
				configuration, "GraphalyticsBenchmark: " + getClass().getSimpleName());
		LOG.debug("- Starting Giraph job");
		return job.run(false) ? 0 : -1;
	}
@ Override public final int run ( String [ ] args ) throws Exception { loadConfiguration ( ) ; GiraphConfiguration configuration = new GiraphConfiguration ( getConf ( ) ) ; configuration . setComputationClass ( getComputationClass ( ) ) ; GiraphFileInputFormat . addVertexInputPath ( configuration , new Path ( vertexInputPath ) ) ; GiraphFileInputFormat . addEdgeInputPath ( configuration , new Path ( edgeInputPath ) ) ; configuration . setVertexInputFormatClass ( getVertexInputFormatClass ( ) ) ; configuration . setEdgeInputFormatClass ( getEdgeInputFormatClass ( ) ) ; configuration . set ( FileOutputFormat . OUTDIR , outputPath ) ; if ( getVertexOutputFormatClass ( ) != null ) { configuration . setVertexOutputFormatClass ( getVertexOutputFormatClass ( ) ) ; } else { configuration . setEdgeOutputFormatClass ( getEdgeOutputFormatClass ( ) ) ; } configuration . setWorkerConfiguration ( workerCount , workerCount , 100.0f ) ; configuration . setZooKeeperConfiguration ( zooKeeperAddress ) ; configuration . setInt ( "mapreduce.map.memory.mb" , workerMemory ) ; FacebookConfiguration . MAPPER_MEMORY . set ( configuration , workerHeap / 1024 ) ; FacebookConfiguration . MAPPER_CORES . set ( configuration , workerCores ) ; FacebookConfiguration . CONFIGURE_JAVA_OPTS . set ( configuration , true ) ; new FacebookConfiguration ( ) . configure ( configuration ) ; configuration . set ( "mapreduce.map.java.opts" , configuration . get ( "mapred.child.java.opts" ) ) ; TRACK_JOB_PROGRESS_ON_CLIENT . set ( configuration , false ) ; configure ( configuration ) ; org . apache . giraph . job . GiraphJob job = new org . apache . giraph . job . GiraphJob ( configuration , "GraphalyticsBenchmark: " + getClass ( ) . getSimpleName ( ) ) ; LOG . debug ( "- Starting Giraph job" ) ; return job . run ( false ) ? 0 : - 1 ; }
Creates a new Giraph job configuration and loads it with generic options
 such as input and output paths, the number of workers, and the worker
 heap size.
Creates a new Giraph job configuration and loads it with generic options such as input and output paths the number of workers and the worker heap size .
// Prepare the job configuration // Set the computation class // Set input paths // Set vertex/edge input format class // Set and output path and class // Set deployment-specific configuration from external configuration files // Set the amount of memory and cores per mapper and allow the FacebookConfiguration to derive the correct // MapReduce settings and parallelism // Copy deprecated "mapred.child.java.opts" to new "mapreduce.map.java.opts" // Disable job progress on client due to missing libthrift dependency // Set algorithm-specific configuration // Create the Giraph job // Launch it