You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@giraph.apache.org by fabrizio silvestri <fa...@isti.cnr.it> on 2012/09/06 10:00:31 UTC
A very newbie question about VertexInputFormat and VertexOutputFormat
Hello Everybody,
I'm very new to giraph and I would like to run some toy example before
trying to add my parts of code. In particular I would like to run a
PageRank computation on a toy graph stored on a text file with a
format that is compatible with
org.apache.giraph.io.IntIntNullIntTextInputFormat
When run with
hadoop jar giraph-0.2-SNAPSHOT-for-hadoop-0.20.203.0-jar-with-dependencies.jar
org.apache.giraph.GiraphRunner \
org.apache.giraph.examples.SimplePageRankVertex -w 1 \
-if org.apache.giraph.io.IntIntNullIntTextInputFormat \
-of org.apache.giraph.io.IdWithValueTextOutputFormat
I got the following error:
12/09/06 09:59:24 INFO giraph.GiraphRunner: No input path specified.
Ensure your InputFormat does not require one.
12/09/06 09:59:24 INFO giraph.GiraphRunner: No output path specified.
Ensure your OutputFormat does not require one.
Exception in thread "main" java.lang.IllegalArgumentException:
checkClassTypes: Vertex index types don't match, vertex - class
org.apache.hadoop.io.LongWritable, vertex input format - class
org.apache.hadoop.io.IntWritable
at org.apache.giraph.graph.GiraphTypeValidator.verifyVertexInputFormatGenericTypes(GiraphTypeValidator.java:116)
at org.apache.giraph.graph.GiraphTypeValidator.validateClassTypes(GiraphTypeValidator.java:100)
at org.apache.giraph.GiraphRunner.run(GiraphRunner.java:231)
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:247)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
I know this might sound stupid... but... I'm really stuck, here! :)
Is there any OuputFormat compatible with IntIntNullIntTextInputFormat?
Thanks in advance
f
Re: A very newbie question about VertexInputFormat and VertexOutputFormat
Posted by Henry Garner <he...@henrygarner.com>.
Hi Fabrizio,
I'm just getting started with Giraph and struggled with getting a 'hello world' example running too. It looks like you're missing the input and output path arguments (-ip, -op) telling Giraph where to load your data from and where to write the results.
If you just want to see something working and don't mind which data you process, I found following along with the shortest path example helpful (https://cwiki.apache.org/confluence/display/GIRAPH/Shortest+Paths+Example). I got the algorithm working through GiraphRunner by loading the sample data from (http://ece.northwestern.edu/~aching/shortestPathsInputGraph.tar.gz) into hadoop at ~/shortestPathsInputGraph and then running the following:
hadoop jar giraph-0.2-SNAPSHOT-for-hadoop-0.20.203.0-jar-with-dependencies.jar \
org.apache.giraph.GiraphRunner \
org.apache.giraph.examples.SimpleShortestPathsVertex \
-if org.apache.giraph.io.JsonLongDoubleFloatDoubleVertexInputFormat -ip shortestPathsInputGraph \
-of org.apache.giraph.io.JsonLongDoubleFloatDoubleVertexOutputFormat -op shortestPathsOutputGraph \
-w 1
Hope that helps.
Best wishes,
Henry
On 6 Sep 2012, at 09:00, fabrizio silvestri wrote:
> Hello Everybody,
>
> I'm very new to giraph and I would like to run some toy example before
> trying to add my parts of code. In particular I would like to run a
> PageRank computation on a toy graph stored on a text file with a
> format that is compatible with
> org.apache.giraph.io.IntIntNullIntTextInputFormat
>
> When run with
>
> hadoop jar giraph-0.2-SNAPSHOT-for-hadoop-0.20.203.0-jar-with-dependencies.jar
> org.apache.giraph.GiraphRunner \
> org.apache.giraph.examples.SimplePageRankVertex -w 1 \
> -if org.apache.giraph.io.IntIntNullIntTextInputFormat \
> -of org.apache.giraph.io.IdWithValueTextOutputFormat
>
>
> I got the following error:
>
> 12/09/06 09:59:24 INFO giraph.GiraphRunner: No input path specified.
> Ensure your InputFormat does not require one.
> 12/09/06 09:59:24 INFO giraph.GiraphRunner: No output path specified.
> Ensure your OutputFormat does not require one.
> Exception in thread "main" java.lang.IllegalArgumentException:
> checkClassTypes: Vertex index types don't match, vertex - class
> org.apache.hadoop.io.LongWritable, vertex input format - class
> org.apache.hadoop.io.IntWritable
> at org.apache.giraph.graph.GiraphTypeValidator.verifyVertexInputFormatGenericTypes(GiraphTypeValidator.java:116)
> at org.apache.giraph.graph.GiraphTypeValidator.validateClassTypes(GiraphTypeValidator.java:100)
> at org.apache.giraph.GiraphRunner.run(GiraphRunner.java:231)
> 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:247)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
>
> I know this might sound stupid... but... I'm really stuck, here! :)
>
> Is there any OuputFormat compatible with IntIntNullIntTextInputFormat?
>
> Thanks in advance
> f