After packaging Giraph (i.e., you can locate the JAR files under "target" folder in each module), you can run one of the included examples under /directory-to-giraph/giraph-examples as follows:
/directory-to-hadoop/bin/hadoop jar /directory-to-giraph/giraph-examples/target/giraph-examples-1.1.0-SNAPSHOT-for-hadoop-0.20.203.0-jar-with-dependencies.jar org.apache.giraph.GiraphRunner org.apache.giraph.examples.SimpleShortestPathsComputation -vif org.apache.giraph.io.formats.JsonLongDoubleFloatDoubleVertexInputFormat -vip /dfs-user-direcory/some-input-json -of org.apache.giraph.io.formats.IdWithValueTextOutputFormat -op /dfs-user-direcory/some-output-text -w 1 This runs the SimpleShortestPathsComputation using the input file /dfs-user-direcory/some-input-json, which has the format [source_id, source_value, [ [dest_id, edge_weight], ...] ]. It comutes the shortest paths to all nodes from a given source, which is the first source_id in the input file. The output file is /dfs-user-direcory/some-output-text, and its format is "source_id distance_value". The computation is done using one worker. You can run he following for more info: /directory-to-hadoop/bin/hadoop jar /directory-to-giraph/giraph-examples/target/giraph-examples-1.1.0-SNAPSHOT-for-hadoop-0.20.203.0-jar-with-dependencies.jar org.apache.giraph.GiraphRunner -h Hope this helps. Cheers, Yazan On Fri, May 31, 2013 at 6:07 PM, Puneet Agarwal <[email protected]> wrote: > It seems there are two ways to run a Giraph job. > > a) using the class InternalVertexRunner > b) using the class GiraphJob > > Which one should be used where ? > > Thanks > Puneet
