You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@giraph.apache.org by "Avery Ching (Created) (JIRA)" <ji...@apache.org> on 2011/12/21 06:53:30 UTC
[jira] [Created] (GIRAPH-113) Change cast to Vertex used in
prepareSuperstep() to BasicVertex
Change cast to Vertex used in prepareSuperstep() to BasicVertex
---------------------------------------------------------------
Key: GIRAPH-113
URL: https://issues.apache.org/jira/browse/GIRAPH-113
Project: Giraph
Issue Type: Bug
Reporter: Yuanyuan Tian
Priority: Minor
Hi,
I decided to use LongDoubleFloatDoubleVertex in a graph algorithm because it uses more compact and efficient mahout collections. However I run into an error when running the algorithm:
java.lang.ClassCastException: org.apache.giraph.graph.LongDoubleFloatDoubleVertex cannot be cast to org.apache.giraph.graph.Vertex
at org.apache.giraph.comm.BasicRPCCommunications.prepareSuperstep(BasicRPCCommunications.java:1016)
at org.apache.giraph.graph.BspServiceWorker.startSuperstep(BspServiceWorker.java:843)
at org.apache.giraph.graph.GraphMapper.map(GraphMapper.java:569)
at org.apache.giraph.graph.GraphMapper.run(GraphMapper.java:728)
... 7 more
Basically, the problem is that in BasicRPCCommunications.prepareSuperStep(), the LongDoubleFloatDoubleVertex are cast to Vertex in the following code fragment. But LongDoubleFloatDoubleVertex inherits from BasicVertex instead of Vertex.
if (vertex != null) {
((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
partition.putVertex((Vertex<I, V, E, M>) vertex);
} else if (originalVertex != null) {
partition.removeVertex(originalVertex.getVertexId());
}
I did a simple change: cast LongDoubleFloatDoubleVertex to BasicVertex. The problem went away, and the algorithm finished without any error. But I am not sure this change has any implication to other parts of the code. So, I hope to get some comments from the Giraph developers.
if (vertex != null) {
((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
partition.putVertex((BasicVertex<I, V, E, M>) vertex);
} else if (originalVertex != null) {
partition.removeVertex(originalVertex.getVertexId());
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (GIRAPH-113) Change cast to Vertex used in
prepareSuperstep() to BasicVertex
Posted by "Avery Ching (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Avery Ching resolved GIRAPH-113.
--------------------------------
Resolution: Fixed
Thanks for the fix YuanYuan! I've added you as a contributor to Giraph.
> Change cast to Vertex used in prepareSuperstep() to BasicVertex
> ---------------------------------------------------------------
>
> Key: GIRAPH-113
> URL: https://issues.apache.org/jira/browse/GIRAPH-113
> Project: Giraph
> Issue Type: Bug
> Reporter: Yuanyuan Tian
> Assignee: Yuanyuan Tian
> Priority: Minor
> Attachments: GIRAPH-113.patch
>
>
> Hi,
> I decided to use LongDoubleFloatDoubleVertex in a graph algorithm because it uses more compact and efficient mahout collections. However I run into an error when running the algorithm:
> java.lang.ClassCastException: org.apache.giraph.graph.LongDoubleFloatDoubleVertex cannot be cast to org.apache.giraph.graph.Vertex
> at org.apache.giraph.comm.BasicRPCCommunications.prepareSuperstep(BasicRPCCommunications.java:1016)
> at org.apache.giraph.graph.BspServiceWorker.startSuperstep(BspServiceWorker.java:843)
> at org.apache.giraph.graph.GraphMapper.map(GraphMapper.java:569)
> at org.apache.giraph.graph.GraphMapper.run(GraphMapper.java:728)
> ... 7 more
> Basically, the problem is that in BasicRPCCommunications.prepareSuperStep(), the LongDoubleFloatDoubleVertex are cast to Vertex in the following code fragment. But LongDoubleFloatDoubleVertex inherits from BasicVertex instead of Vertex.
> if (vertex != null) {
> ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
> partition.putVertex((Vertex<I, V, E, M>) vertex);
> } else if (originalVertex != null) {
> partition.removeVertex(originalVertex.getVertexId());
> }
> I did a simple change: cast LongDoubleFloatDoubleVertex to BasicVertex. The problem went away, and the algorithm finished without any error. But I am not sure this change has any implication to other parts of the code. So, I hope to get some comments from the Giraph developers.
> if (vertex != null) {
> ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
> partition.putVertex((BasicVertex<I, V, E, M>) vertex);
> } else if (originalVertex != null) {
> partition.removeVertex(originalVertex.getVertexId());
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (GIRAPH-113) Change cast to Vertex used in
prepareSuperstep() to BasicVertex
Posted by "Avery Ching (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Avery Ching updated GIRAPH-113:
-------------------------------
Attachment: GIRAPH-113.patch
> Change cast to Vertex used in prepareSuperstep() to BasicVertex
> ---------------------------------------------------------------
>
> Key: GIRAPH-113
> URL: https://issues.apache.org/jira/browse/GIRAPH-113
> Project: Giraph
> Issue Type: Bug
> Reporter: Yuanyuan Tian
> Assignee: Avery Ching
> Priority: Minor
> Attachments: GIRAPH-113.patch
>
>
> Hi,
> I decided to use LongDoubleFloatDoubleVertex in a graph algorithm because it uses more compact and efficient mahout collections. However I run into an error when running the algorithm:
> java.lang.ClassCastException: org.apache.giraph.graph.LongDoubleFloatDoubleVertex cannot be cast to org.apache.giraph.graph.Vertex
> at org.apache.giraph.comm.BasicRPCCommunications.prepareSuperstep(BasicRPCCommunications.java:1016)
> at org.apache.giraph.graph.BspServiceWorker.startSuperstep(BspServiceWorker.java:843)
> at org.apache.giraph.graph.GraphMapper.map(GraphMapper.java:569)
> at org.apache.giraph.graph.GraphMapper.run(GraphMapper.java:728)
> ... 7 more
> Basically, the problem is that in BasicRPCCommunications.prepareSuperStep(), the LongDoubleFloatDoubleVertex are cast to Vertex in the following code fragment. But LongDoubleFloatDoubleVertex inherits from BasicVertex instead of Vertex.
> if (vertex != null) {
> ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
> partition.putVertex((Vertex<I, V, E, M>) vertex);
> } else if (originalVertex != null) {
> partition.removeVertex(originalVertex.getVertexId());
> }
> I did a simple change: cast LongDoubleFloatDoubleVertex to BasicVertex. The problem went away, and the algorithm finished without any error. But I am not sure this change has any implication to other parts of the code. So, I hope to get some comments from the Giraph developers.
> if (vertex != null) {
> ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
> partition.putVertex((BasicVertex<I, V, E, M>) vertex);
> } else if (originalVertex != null) {
> partition.removeVertex(originalVertex.getVertexId());
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (GIRAPH-113) Change cast to Vertex used in
prepareSuperstep() to BasicVertex
Posted by "Avery Ching (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Avery Ching reassigned GIRAPH-113:
----------------------------------
Assignee: Avery Ching
> Change cast to Vertex used in prepareSuperstep() to BasicVertex
> ---------------------------------------------------------------
>
> Key: GIRAPH-113
> URL: https://issues.apache.org/jira/browse/GIRAPH-113
> Project: Giraph
> Issue Type: Bug
> Reporter: Yuanyuan Tian
> Assignee: Avery Ching
> Priority: Minor
>
> Hi,
> I decided to use LongDoubleFloatDoubleVertex in a graph algorithm because it uses more compact and efficient mahout collections. However I run into an error when running the algorithm:
> java.lang.ClassCastException: org.apache.giraph.graph.LongDoubleFloatDoubleVertex cannot be cast to org.apache.giraph.graph.Vertex
> at org.apache.giraph.comm.BasicRPCCommunications.prepareSuperstep(BasicRPCCommunications.java:1016)
> at org.apache.giraph.graph.BspServiceWorker.startSuperstep(BspServiceWorker.java:843)
> at org.apache.giraph.graph.GraphMapper.map(GraphMapper.java:569)
> at org.apache.giraph.graph.GraphMapper.run(GraphMapper.java:728)
> ... 7 more
> Basically, the problem is that in BasicRPCCommunications.prepareSuperStep(), the LongDoubleFloatDoubleVertex are cast to Vertex in the following code fragment. But LongDoubleFloatDoubleVertex inherits from BasicVertex instead of Vertex.
> if (vertex != null) {
> ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
> partition.putVertex((Vertex<I, V, E, M>) vertex);
> } else if (originalVertex != null) {
> partition.removeVertex(originalVertex.getVertexId());
> }
> I did a simple change: cast LongDoubleFloatDoubleVertex to BasicVertex. The problem went away, and the algorithm finished without any error. But I am not sure this change has any implication to other parts of the code. So, I hope to get some comments from the Giraph developers.
> if (vertex != null) {
> ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
> partition.putVertex((BasicVertex<I, V, E, M>) vertex);
> } else if (originalVertex != null) {
> partition.removeVertex(originalVertex.getVertexId());
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GIRAPH-113) Change cast to Vertex used in
prepareSuperstep() to BasicVertex
Posted by "Avery Ching (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174274#comment-13174274 ]
Avery Ching commented on GIRAPH-113:
------------------------------------
I agree that GIRAPH-83 and GIRAPH-95 need to be addressed at some point. But this should work for now as EdgeListVertex, Vertex, and LongDoubleFloatDoubleVertex all extend MutableVertex.
> Change cast to Vertex used in prepareSuperstep() to BasicVertex
> ---------------------------------------------------------------
>
> Key: GIRAPH-113
> URL: https://issues.apache.org/jira/browse/GIRAPH-113
> Project: Giraph
> Issue Type: Bug
> Reporter: Yuanyuan Tian
> Assignee: Yuanyuan Tian
> Priority: Minor
> Attachments: GIRAPH-113.patch
>
>
> Hi,
> I decided to use LongDoubleFloatDoubleVertex in a graph algorithm because it uses more compact and efficient mahout collections. However I run into an error when running the algorithm:
> java.lang.ClassCastException: org.apache.giraph.graph.LongDoubleFloatDoubleVertex cannot be cast to org.apache.giraph.graph.Vertex
> at org.apache.giraph.comm.BasicRPCCommunications.prepareSuperstep(BasicRPCCommunications.java:1016)
> at org.apache.giraph.graph.BspServiceWorker.startSuperstep(BspServiceWorker.java:843)
> at org.apache.giraph.graph.GraphMapper.map(GraphMapper.java:569)
> at org.apache.giraph.graph.GraphMapper.run(GraphMapper.java:728)
> ... 7 more
> Basically, the problem is that in BasicRPCCommunications.prepareSuperStep(), the LongDoubleFloatDoubleVertex are cast to Vertex in the following code fragment. But LongDoubleFloatDoubleVertex inherits from BasicVertex instead of Vertex.
> if (vertex != null) {
> ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
> partition.putVertex((Vertex<I, V, E, M>) vertex);
> } else if (originalVertex != null) {
> partition.removeVertex(originalVertex.getVertexId());
> }
> I did a simple change: cast LongDoubleFloatDoubleVertex to BasicVertex. The problem went away, and the algorithm finished without any error. But I am not sure this change has any implication to other parts of the code. So, I hope to get some comments from the Giraph developers.
> if (vertex != null) {
> ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
> partition.putVertex((BasicVertex<I, V, E, M>) vertex);
> } else if (originalVertex != null) {
> partition.removeVertex(originalVertex.getVertexId());
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GIRAPH-113) Change cast to Vertex used in
prepareSuperstep() to BasicVertex
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173924#comment-13173924 ]
Hudson commented on GIRAPH-113:
-------------------------------
Integrated in Giraph-trunk-Commit #56 (See [https://builds.apache.org/job/Giraph-trunk-Commit/56/])
GIRAPH-113: Change cast to Vertex used in prepareSuperstep() to
BasicVertex. (humming80 via aching)
aching : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1221634
Files :
* /incubator/giraph/trunk/CHANGELOG
* /incubator/giraph/trunk/src/main/java/org/apache/giraph/comm/BasicRPCCommunications.java
> Change cast to Vertex used in prepareSuperstep() to BasicVertex
> ---------------------------------------------------------------
>
> Key: GIRAPH-113
> URL: https://issues.apache.org/jira/browse/GIRAPH-113
> Project: Giraph
> Issue Type: Bug
> Reporter: Yuanyuan Tian
> Assignee: Avery Ching
> Priority: Minor
> Attachments: GIRAPH-113.patch
>
>
> Hi,
> I decided to use LongDoubleFloatDoubleVertex in a graph algorithm because it uses more compact and efficient mahout collections. However I run into an error when running the algorithm:
> java.lang.ClassCastException: org.apache.giraph.graph.LongDoubleFloatDoubleVertex cannot be cast to org.apache.giraph.graph.Vertex
> at org.apache.giraph.comm.BasicRPCCommunications.prepareSuperstep(BasicRPCCommunications.java:1016)
> at org.apache.giraph.graph.BspServiceWorker.startSuperstep(BspServiceWorker.java:843)
> at org.apache.giraph.graph.GraphMapper.map(GraphMapper.java:569)
> at org.apache.giraph.graph.GraphMapper.run(GraphMapper.java:728)
> ... 7 more
> Basically, the problem is that in BasicRPCCommunications.prepareSuperStep(), the LongDoubleFloatDoubleVertex are cast to Vertex in the following code fragment. But LongDoubleFloatDoubleVertex inherits from BasicVertex instead of Vertex.
> if (vertex != null) {
> ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
> partition.putVertex((Vertex<I, V, E, M>) vertex);
> } else if (originalVertex != null) {
> partition.removeVertex(originalVertex.getVertexId());
> }
> I did a simple change: cast LongDoubleFloatDoubleVertex to BasicVertex. The problem went away, and the algorithm finished without any error. But I am not sure this change has any implication to other parts of the code. So, I hope to get some comments from the Giraph developers.
> if (vertex != null) {
> ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
> partition.putVertex((BasicVertex<I, V, E, M>) vertex);
> } else if (originalVertex != null) {
> partition.removeVertex(originalVertex.getVertexId());
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (GIRAPH-113) Change cast to Vertex used in
prepareSuperstep() to BasicVertex
Posted by "Avery Ching (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Avery Ching reassigned GIRAPH-113:
----------------------------------
Assignee: Yuanyuan Tian (was: Avery Ching)
> Change cast to Vertex used in prepareSuperstep() to BasicVertex
> ---------------------------------------------------------------
>
> Key: GIRAPH-113
> URL: https://issues.apache.org/jira/browse/GIRAPH-113
> Project: Giraph
> Issue Type: Bug
> Reporter: Yuanyuan Tian
> Assignee: Yuanyuan Tian
> Priority: Minor
> Attachments: GIRAPH-113.patch
>
>
> Hi,
> I decided to use LongDoubleFloatDoubleVertex in a graph algorithm because it uses more compact and efficient mahout collections. However I run into an error when running the algorithm:
> java.lang.ClassCastException: org.apache.giraph.graph.LongDoubleFloatDoubleVertex cannot be cast to org.apache.giraph.graph.Vertex
> at org.apache.giraph.comm.BasicRPCCommunications.prepareSuperstep(BasicRPCCommunications.java:1016)
> at org.apache.giraph.graph.BspServiceWorker.startSuperstep(BspServiceWorker.java:843)
> at org.apache.giraph.graph.GraphMapper.map(GraphMapper.java:569)
> at org.apache.giraph.graph.GraphMapper.run(GraphMapper.java:728)
> ... 7 more
> Basically, the problem is that in BasicRPCCommunications.prepareSuperStep(), the LongDoubleFloatDoubleVertex are cast to Vertex in the following code fragment. But LongDoubleFloatDoubleVertex inherits from BasicVertex instead of Vertex.
> if (vertex != null) {
> ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
> partition.putVertex((Vertex<I, V, E, M>) vertex);
> } else if (originalVertex != null) {
> partition.removeVertex(originalVertex.getVertexId());
> }
> I did a simple change: cast LongDoubleFloatDoubleVertex to BasicVertex. The problem went away, and the algorithm finished without any error. But I am not sure this change has any implication to other parts of the code. So, I hope to get some comments from the Giraph developers.
> if (vertex != null) {
> ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
> partition.putVertex((BasicVertex<I, V, E, M>) vertex);
> } else if (originalVertex != null) {
> partition.removeVertex(originalVertex.getVertexId());
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GIRAPH-113) Change cast to Vertex used in
prepareSuperstep() to BasicVertex
Posted by "Claudio Martella (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173967#comment-13173967 ]
Claudio Martella commented on GIRAPH-113:
-----------------------------------------
a problem here is still the bug connected to GIRAPH-95. In the line before the actual fix there's an explicit cast to MutableVertex as well. This still isn't expected for users of BasicVertex.
> Change cast to Vertex used in prepareSuperstep() to BasicVertex
> ---------------------------------------------------------------
>
> Key: GIRAPH-113
> URL: https://issues.apache.org/jira/browse/GIRAPH-113
> Project: Giraph
> Issue Type: Bug
> Reporter: Yuanyuan Tian
> Assignee: Yuanyuan Tian
> Priority: Minor
> Attachments: GIRAPH-113.patch
>
>
> Hi,
> I decided to use LongDoubleFloatDoubleVertex in a graph algorithm because it uses more compact and efficient mahout collections. However I run into an error when running the algorithm:
> java.lang.ClassCastException: org.apache.giraph.graph.LongDoubleFloatDoubleVertex cannot be cast to org.apache.giraph.graph.Vertex
> at org.apache.giraph.comm.BasicRPCCommunications.prepareSuperstep(BasicRPCCommunications.java:1016)
> at org.apache.giraph.graph.BspServiceWorker.startSuperstep(BspServiceWorker.java:843)
> at org.apache.giraph.graph.GraphMapper.map(GraphMapper.java:569)
> at org.apache.giraph.graph.GraphMapper.run(GraphMapper.java:728)
> ... 7 more
> Basically, the problem is that in BasicRPCCommunications.prepareSuperStep(), the LongDoubleFloatDoubleVertex are cast to Vertex in the following code fragment. But LongDoubleFloatDoubleVertex inherits from BasicVertex instead of Vertex.
> if (vertex != null) {
> ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
> partition.putVertex((Vertex<I, V, E, M>) vertex);
> } else if (originalVertex != null) {
> partition.removeVertex(originalVertex.getVertexId());
> }
> I did a simple change: cast LongDoubleFloatDoubleVertex to BasicVertex. The problem went away, and the algorithm finished without any error. But I am not sure this change has any implication to other parts of the code. So, I hope to get some comments from the Giraph developers.
> if (vertex != null) {
> ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
> partition.putVertex((BasicVertex<I, V, E, M>) vertex);
> } else if (originalVertex != null) {
> partition.removeVertex(originalVertex.getVertexId());
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GIRAPH-113) Change cast to Vertex used in
prepareSuperstep() to BasicVertex
Posted by "Jakob Homan (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173921#comment-13173921 ]
Jakob Homan commented on GIRAPH-113:
------------------------------------
+1 (grumbling about GIRAPH-83)
> Change cast to Vertex used in prepareSuperstep() to BasicVertex
> ---------------------------------------------------------------
>
> Key: GIRAPH-113
> URL: https://issues.apache.org/jira/browse/GIRAPH-113
> Project: Giraph
> Issue Type: Bug
> Reporter: Yuanyuan Tian
> Assignee: Avery Ching
> Priority: Minor
> Attachments: GIRAPH-113.patch
>
>
> Hi,
> I decided to use LongDoubleFloatDoubleVertex in a graph algorithm because it uses more compact and efficient mahout collections. However I run into an error when running the algorithm:
> java.lang.ClassCastException: org.apache.giraph.graph.LongDoubleFloatDoubleVertex cannot be cast to org.apache.giraph.graph.Vertex
> at org.apache.giraph.comm.BasicRPCCommunications.prepareSuperstep(BasicRPCCommunications.java:1016)
> at org.apache.giraph.graph.BspServiceWorker.startSuperstep(BspServiceWorker.java:843)
> at org.apache.giraph.graph.GraphMapper.map(GraphMapper.java:569)
> at org.apache.giraph.graph.GraphMapper.run(GraphMapper.java:728)
> ... 7 more
> Basically, the problem is that in BasicRPCCommunications.prepareSuperStep(), the LongDoubleFloatDoubleVertex are cast to Vertex in the following code fragment. But LongDoubleFloatDoubleVertex inherits from BasicVertex instead of Vertex.
> if (vertex != null) {
> ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
> partition.putVertex((Vertex<I, V, E, M>) vertex);
> } else if (originalVertex != null) {
> partition.removeVertex(originalVertex.getVertexId());
> }
> I did a simple change: cast LongDoubleFloatDoubleVertex to BasicVertex. The problem went away, and the algorithm finished without any error. But I am not sure this change has any implication to other parts of the code. So, I hope to get some comments from the Giraph developers.
> if (vertex != null) {
> ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
> partition.putVertex((BasicVertex<I, V, E, M>) vertex);
> } else if (originalVertex != null) {
> partition.removeVertex(originalVertex.getVertexId());
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira