Hi Yazan,

This indeed if of great help especially the help command:

"/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"

But there seems to be some problem in your command because there is no class 
named "org.apache.giraph.examples.SimpleShortestPathsComputation"

I then looked up in the path "org/apache/giraph/examples/" and found that there 
is a class named "org.apache.giraph.examples.SimpleShortestPathsVertex" so I 
tried this instead of yours. But this does not work

It gives following error. Any guidance will be helpful

13/06/01 18:28:22 INFO utils.ConfigurationUtils: No edge input format 
specified. Ensure your InputFormat does not require one.
13/06/01 18:28:22 WARN job.GiraphConfigurationValidator: Output format vertex 
index type is not known
13/06/01 18:28:22 WARN job.GiraphConfigurationValidator: Output format vertex 
value type is not known
13/06/01 18:28:22 WARN job.GiraphConfigurationValidator: Output format edge 
value type is not known
13/06/01 18:28:22 INFO job.GiraphJob: run: Since checkpointing is disabled 
(default), do not allow any task retries (setting mapred.map.max.attempts = 0, 
old value = 4)
Exception in thread "main" java.lang.IllegalArgumentException: 
checkLocalJobRunnerConfiguration: When using LocalJobRunner, you cannot run in 
split master / worker mode since there is only 1 task at a time!
at 
org.apache.giraph.job.GiraphJob.checkLocalJobRunnerConfiguration(GiraphJob.java:157)
at org.apache.giraph.job.GiraphJob.run(GiraphJob.java:225)
at org.apache.giraph.GiraphRunner.run(GiraphRunner.java:94)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
at org.apache.giraph.GiraphRunner.main(GiraphRunner.java:124)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)




Regards

Puneet



----- Original Message -----
From: Yazan Boshmaf <bosh...@ece.ubc.ca>
To: user@giraph.apache.org; Puneet Agarwal <puagar...@yahoo.com>
Cc: 
Sent: Saturday, June 1, 2013 7:59 AM
Subject: Re: GiraphJob Vs InternalVertexRunner

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 <puagar...@yahoo.com> 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

Reply via email to