giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Byungnam Lim (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (GIRAPH-679) Edge e.getTargetVertexId() returns same instance
Date Tue, 04 Jun 2013 07:22:19 GMT

     [ https://issues.apache.org/jira/browse/GIRAPH-679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Byungnam Lim updated GIRAPH-679:
--------------------------------

    Description: 
I was trying to remove all edges of each vertex in one superstep. Below is my code.

{quote}
for (Edge<LongWritable, FloatWritable> e : vertex.getEdges()) {
      removeEdgesRequest(vertex.getId(), e.getTargetVertexId());
}
{quote}
But it just removed only one edge in one superstep.

I debugged and found e.getTargetVertexId() returns one same instances so that makes the removedEdgeList.add()
in VertexMutations class could not add the elements properly.

By creating new LongWritable instance for targetVertexId parameter, I could remove all edges
in one superstep.



But I'm doubt that I found that the Edge e also gets one same instance during 'for' loop.
Maybe the problem exists in vertex.getEdges() not e.getTargetVertexId().

  was:
I was trying to remove all edges of each vertex in one superstep. Below is my code.

<code>
for (Edge<LongWritable, FloatWritable> e : vertex.getEdges()) {
      removeEdgesRequest(vertex.getId(), e.getTargetVertexId());
}
</code>
But it just removed only one edge in one superstep.

I debugged and found e.getTargetVertexId() returns one same instances so that makes the removedEdgeList.add()
in VertexMutations class could not add the elements properly.

By creating new LongWritable instance for targetVertexId parameter, I could remove all edges
in one superstep.



But I'm doubt that I found that the Edge e also gets one same instance during 'for' loop.
Maybe the problem exists in vertex.getEdges() not e.getTargetVertexId().

    
> Edge e.getTargetVertexId() returns same instance
> ------------------------------------------------
>
>                 Key: GIRAPH-679
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-679
>             Project: Giraph
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 1.1.0
>            Reporter: Byungnam Lim
>
> I was trying to remove all edges of each vertex in one superstep. Below is my code.
> {quote}
> for (Edge<LongWritable, FloatWritable> e : vertex.getEdges()) {
>       removeEdgesRequest(vertex.getId(), e.getTargetVertexId());
> }
> {quote}
> But it just removed only one edge in one superstep.
> I debugged and found e.getTargetVertexId() returns one same instances so that makes the
removedEdgeList.add() in VertexMutations class could not add the elements properly.
> By creating new LongWritable instance for targetVertexId parameter, I could remove all
edges in one superstep.
> But I'm doubt that I found that the Edge e also gets one same instance during 'for' loop.
Maybe the problem exists in vertex.getEdges() not e.getTargetVertexId().

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