giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "eunjihwang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GIRAPH-529) Compile error when compiling the giraph shortest path problem: getOutEdgeMap()
Date Mon, 25 Feb 2013 01:09:11 GMT

    [ https://issues.apache.org/jira/browse/GIRAPH-529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13585555#comment-13585555
] 

eunjihwang commented on GIRAPH-529:
-----------------------------------

Thank you for your comment. 
However, I don't implement IO formats myself. I just followed example code.

I wrote compte(),run() and main() method in SimpleShortestPathsVertex class
VertexReader() method in SimpleShortestPathsVertexInputFormat class
SimpleShortestPathsVertexReader() and next() method in SimpleShortestPathsVertexReader class
VertexWriter() method in SimpleShortestPathsVertexOutputFormat class and 
SimpleShortestPathsVertexWriter() and writeVertex() method in SimpleShortestPathsVertexWriter
class.


and I also import necessary packages in my code, such as org.apache.giraph.graph.Edge , org.apache.hadoop.io.DoubleWirtable,
and so on.

But there are still 4 errors in my code. 
-------------------------
SimpleShortestPathVertex.java:61: error: cannot find symbol
			for(Edge<LongWritable, FloatWritable> edge : getOutEdgeMap().values()){
			                                             ^
  symbol:   method getOutEdgeMap()
  location: class SimpleShortestPathVertex
SimpleShortestPathVertex.java:117: error: SimpleShortestPathVertexReader is not abstract and
does not override abstract method getCurrentVertex() in VertexReader
class SimpleShortestPathVertexReader extends TextVertexReader<LongWritable, DoubleWritable,
FloatWritable, DoubleWritable>{
^
SimpleShortestPathVertex.java:139: error: method addEdge in class MutableVertex<I,V,E,M>
cannot be applied to given types;
				vertex.addEdge(new Edge<LongWritable,FloatWritable>(new LongWritable(jEdge.getLong(0)),
new FloatWritable((float)jEdge.getDouble(1))));
				      ^
  required: LongWritable,FloatWritable
  found: Edge<LongWritable,FloatWritable>
  reason: actual and formal argument lists differ in length
  where I,V,E,M are type-variables:
    I extends WritableComparable declared in class MutableVertex
    V extends Writable declared in class MutableVertex
    E extends Writable declared in class MutableVertex
    M extends Writable declared in class MutableVertex
SimpleShortestPathVertex.java:170: error: cannot find symbol
			for(Edge<LongWritable, FloatWritable> edge : vertex.getOutEdgeMap().values()){
			                                                   ^
  symbol:   method getOutEdgeMap()
  location: variable vertex of type BasicVertex<LongWritable,DoubleWritable,FloatWritable,?>
4 errors
------------------------
I found getOutEdgeMap() method in giraph folder, but there is no this method.
Where can I find getOutEdgeMap() method ? 
                
> Compile error when compiling the giraph shortest path problem: getOutEdgeMap()
> ------------------------------------------------------------------------------
>
>                 Key: GIRAPH-529
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-529
>             Project: Giraph
>          Issue Type: Bug
>         Environment: Fedora 18(64-bit), hadoop-1.0.4 version, giraph-0.1.0 version
>            Reporter: eunjihwang
>
> I have some problem when I compiling the giraph shortest path problem
> I can't understand exactly getOutEdgeMap() method.
> Should I implement it? 
> and also I have other compile errors.
> I just write a source code like this; https://github.com/aching/Giraph/wiki/Shortest-Paths-Example
> I attach error messages.
> --------------------
> sp/SimpleShortestPathVertex.java:55: error: cannot find symbol 
> for(Edge<LongWritable, FloatWritable> edge : getOutEdgeMap().values()){ 
>                                              ^ 
>   symbol:   method getOutEdgeMap() 
>   location: class SimpleShortestPathVertex 
> sp/SimpleShortestPathVertex.java:74: error: cannot find symbol 
> FileInputFormat.addInputPath(job, new Path(args[0])); 
> ^ 
>   symbol:   variable FileInputFormat 
>   location: class SimpleShortestPathVertex 
> sp/SimpleShortestPathVertex.java:75: error: cannot find symbol 
> FileOutputFormat.setOutputPath(job, new Path(args[1])); 
> ^ 
>   symbol:   variable FileOutputFormat 
>   location: class SimpleShortestPathVertex 
> sp/SimpleShortestPathVertex.java:88: error: no suitable method found for run(SimpleShortestPathVertex,String[])

> System.exit(ToolRunner.run(new SimpleShortestPathVertex(), args)); 
>                       ^ 
>     method ToolRunner.run(Tool,String[]) is not applicable 
>       (actual argument SimpleShortestPathVertex cannot be converted to Tool by method
invocation conversion) 
>     method ToolRunner.run(Configuration,Tool,String[]) is not applicable 
>       (actual and formal argument lists differ in length) 
> sp/SimpleShortestPathVertex.java:100: error: SimpleShortestPathVertexReader is not abstract
and does not override abstract method getCurrentVertex() in VertexReader 
> class SimpleShortestPathVertexReader extends TextVertexReader<LongWritable, DoubleWritable,
FloatWritable, DoubleWritable>{ 
> ^ 
> sp/SimpleShortestPathVertex.java:121: error: method addEdge in class MutableVertex<I,V,E,M>
cannot be applied to given types; 
> vertex.addEdge(new Edge<LongWritable, FloatWritable>(new LongWritable(jEdge.getLong(0)),
new FloatWritable((float)jEdge.getDouble(1)))); 
>       ^ 
>   required: LongWritable,FloatWritable 
>   found: Edge<LongWritable,FloatWritable> 
>   reason: actual and formal argument lists differ in length 
>   where I,V,E,M are type-variables: 
>     I extends WritableComparable declared in class MutableVertex 
>     V extends Writable declared in class MutableVertex 
>     E extends Writable declared in class MutableVertex 
>     M extends Writable declared in class MutableVertex 
> sp/SimpleShortestPathVertex.java:139: error: lineRecordWriter has private access in TextVertexWriter

> super(lineRecordWriter); 
>       ^ 
> sp/SimpleShortestPathVertex.java:150: error: cannot find symbol 
> for(Edge<LongWritable, FloatWritable> edge : vertex.getOutEdgeMap().values()){

>                                                    ^ 
>   symbol:   method getOutEdgeMap() 
>   location: variable vertex of type BasicVertex<LongWritable,DoubleWritable,FloatWritable,?>

> 8 errors 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message