You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@giraph.apache.org by Ahmet Emre Aladağ <em...@agmlab.com> on 2013/05/17 11:17:24 UTC
Edge value types don't match
Hi,
I'm trying to implement LinkRank in Giraph. For now, I started with a
copy of PageRank example and trying to run and improve it.
My VertexInputFormat: Text Float
My EdgeInputFormat: Text Text
where Text are URLs and Float is the LinkRank score.
Now I'm getting a type mismatch error (below). I could not find the
source of the mismatch. When does one get this error? I'm defining the
edge weights as NullWritable and Messages as FloatWritable. Here it says
at one location I have NullWritable and some place Writable. But I can't
see it.
Thanks,
My source code is:
https://github.com/AGMLab/giraph/tree/trunk/giraph-examples/src/main/java/org/apache/giraph/examples/LinkRank
[emre@localhost giraph-agmlab]$ hadoop jar
giraph-examples/target/giraph-examples-1.1.0-SNAPSHOT-for-hadoop-1.0.2-jar-with-dependencies.jar
org.apache.giraph.GiraphRunner
org.apache.giraph.examples.LinkRank.LinkRankVertex -vif
org.apache.giraph.examples.LinkRank.LinkRankVertexInputFormat -eif
org.apache.giraph.examples.LinkRank.LinkRankEdgeInputFormat -of
org.apache.giraph.examples.LinkRank.LinkRankVertexOutputFormat -w 1 -vip
nodes.txt -eip edges.txt -op linkOutput4
Exception in thread "main" java.lang.IllegalArgumentException:
checkClassTypes: Edge value types don't match, vertex - class
org.apache.hadoop.io.NullWritable, vertex input format - interface
org.apache.hadoop.io.Writable
at
org.apache.giraph.job.GiraphConfigurationValidator.verifyVertexInputFormatGenericTypes(GiraphConfigurationValidator.java:245)
at
org.apache.giraph.job.GiraphConfigurationValidator.validateConfiguration(GiraphConfigurationValidator.java:122)
at
org.apache.giraph.utils.ConfigurationUtils.parseArgs(ConfigurationUtils.java:154)
at org.apache.giraph.GiraphRunner.run(GiraphRunner.java:74)
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:601)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Re: Edge value types don't match
Posted by Ahmet Emre Aladağ <em...@agmlab.com>.
Thank you for your response Alessandro,
Yes I'm using a subclass of VertexInputFormat. When it's being validated,
public class LinkRankEdgeInputFormat extends TextEdgeInputFormat<Text,
NullWritable> causes the error.
Is this bug hard to fix? I'm a newbie so I can't figure out where to
look at for fixing.
For now, I disabled the edge value type check in
verifyVertexInputFormatGenericTypes.
On 05/17/2013 07:52 PM, Alessandro Presta wrote:
> This looks like a bug.
> I assume you're using a VertexValueInputFormat, which is really a
> VertexInputFormat with E = Writable.
> The problem is that we're checking that against the E parameter in Vertex,
> which is NullWritable.
> VertexValueInputFormat was modified after GiraphTypeValidator was created,
> and this didn't get caught.
> Thanks for reporting, I'll file a JIRA now.
>
Re: Edge value types don't match
Posted by Alessandro Presta <al...@fb.com>.
This looks like a bug.
I assume you're using a VertexValueInputFormat, which is really a
VertexInputFormat with E = Writable.
The problem is that we're checking that against the E parameter in Vertex,
which is NullWritable.
VertexValueInputFormat was modified after GiraphTypeValidator was created,
and this didn't get caught.
Thanks for reporting, I'll file a JIRA now.
On 5/17/13 2:17 AM, "Ahmet Emre Aladağ" <em...@agmlab.com> wrote:
>Hi,
>
>I'm trying to implement LinkRank in Giraph. For now, I started with a
>copy of PageRank example and trying to run and improve it.
>
>My VertexInputFormat: Text Float
>My EdgeInputFormat: Text Text
>
>where Text are URLs and Float is the LinkRank score.
>
>
>Now I'm getting a type mismatch error (below). I could not find the
>source of the mismatch. When does one get this error? I'm defining the
>edge weights as NullWritable and Messages as FloatWritable. Here it says
>at one location I have NullWritable and some place Writable. But I can't
>see it.
>
>Thanks,
>
>My source code is:
>https://github.com/AGMLab/giraph/tree/trunk/giraph-examples/src/main/java/
>org/apache/giraph/examples/LinkRank
>
>[emre@localhost giraph-agmlab]$ hadoop jar
>giraph-examples/target/giraph-examples-1.1.0-SNAPSHOT-for-hadoop-1.0.2-jar
>-with-dependencies.jar
>org.apache.giraph.GiraphRunner
>org.apache.giraph.examples.LinkRank.LinkRankVertex -vif
>org.apache.giraph.examples.LinkRank.LinkRankVertexInputFormat -eif
>org.apache.giraph.examples.LinkRank.LinkRankEdgeInputFormat -of
>org.apache.giraph.examples.LinkRank.LinkRankVertexOutputFormat -w 1 -vip
>nodes.txt -eip edges.txt -op linkOutput4
>Exception in thread "main" java.lang.IllegalArgumentException:
>checkClassTypes: Edge value types don't match, vertex - class
>org.apache.hadoop.io.NullWritable, vertex input format - interface
>org.apache.hadoop.io.Writable
> at
>org.apache.giraph.job.GiraphConfigurationValidator.verifyVertexInputFormat
>GenericTypes(GiraphConfigurationValidator.java:245)
> at
>org.apache.giraph.job.GiraphConfigurationValidator.validateConfiguration(G
>iraphConfigurationValidator.java:122)
> at
>org.apache.giraph.utils.ConfigurationUtils.parseArgs(ConfigurationUtils.ja
>va:154)
> at org.apache.giraph.GiraphRunner.run(GiraphRunner.java:74)
> 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(DelegatingMethodAccessorIm
>pl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
>