You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@giraph.apache.org by "Sebastian Schelter (JIRA)" <ji...@apache.org> on 2012/07/10 14:40:40 UTC

[jira] [Created] (GIRAPH-245) BasicRPCCommunications fails with custom vertices

Sebastian Schelter created GIRAPH-245:
-----------------------------------------

             Summary: BasicRPCCommunications fails with custom vertices
                 Key: GIRAPH-245
                 URL: https://issues.apache.org/jira/browse/GIRAPH-245
             Project: Giraph
          Issue Type: Bug
    Affects Versions: 0.2.0
            Reporter: Sebastian Schelter


BasicRPCCommunications assumes that every vertex is an instance of MutableVertex in line 1265:

{noformat} 
      if (vertex != null) {
        ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
        partition.putVertex(vertex);
      }
{noformat} 

For custom vertices that only extend BasicVertex, this code fails with a ClassCastException



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

        

Re: [jira] [Created] (GIRAPH-245) BasicRPCCommunications fails with custom vertices

Posted by Alessandro Presta <al...@fb.com>.
But isn't that line redundant, given that VertexResolver already takes
care of the id?

Anyway, VertexResolver itself looks a bit fragile or at least I find it
hard to follow: do all code paths that include a cast BasicVertex ->
MutableVertex guarantee that the vertex is mutable?
If not, the same issue will pop out there eventually.
Maybe we should be clearer on what is allowed to non-mutable graphs and
handle them separately (possibly throwing an exception instead of failing
the cast).

On 7/19/12 4:45 PM, "Eli Reisman" <in...@gmail.com> wrote:

>Nice catch, this just happened to a user I have been working with, and we
>didn't realize why. I had another issue brought up by a 2nd user that may
>or may not have a JIRA, or this might the the perfect place to address it:
>
>If you are planning on executing a vertex that does not mutate the graph
>at
>all, but you do have data input that includes vertex id's and then a list
>of out edges per vertex, this code should handle the situation where the
>out-edges of one vertex in the data refer to a vertex that does not end up
>having any out-edges of its own, and therefore is not mentioned in the
>actual data list. such a vertex should be created (as it is in a mutable
>algorithm when an new out edge is created to a vertex that does not yet
>exist). The problem is like this:
>
>VERT_ID  EDGE_LIST
>1               3 4 57
>2               1 4
>3                4 2
>4                ...
>...
>7  (end of data)
>
>so 57 is mentioned as having an out edge, but there is no "line 57" in the
>input data. Does that make sense? The final graph we process is not
>mutable, algorithm doesn't mutate it, but we need to create 57 at the
>beginning before processing starts, by the time of super step 0.
>
>On Tue, Jul 10, 2012 at 5:40 AM, Sebastian Schelter (JIRA)
><ji...@apache.org>wrote:
>
>> Sebastian Schelter created GIRAPH-245:
>> -----------------------------------------
>>
>>              Summary: BasicRPCCommunications fails with custom vertices
>>                  Key: GIRAPH-245
>>                  URL: https://issues.apache.org/jira/browse/GIRAPH-245
>>              Project: Giraph
>>           Issue Type: Bug
>>     Affects Versions: 0.2.0
>>             Reporter: Sebastian Schelter
>>
>>
>> BasicRPCCommunications assumes that every vertex is an instance of
>> MutableVertex in line 1265:
>>
>> {noformat}
>>       if (vertex != null) {
>>         ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
>>         partition.putVertex(vertex);
>>       }
>> {noformat}
>>
>> For custom vertices that only extend BasicVertex, this code fails with a
>> ClassCastException
>>
>>
>>
>> --
>> 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
>>
>>
>>


Re: [jira] [Created] (GIRAPH-245) BasicRPCCommunications fails with custom vertices

Posted by Eli Reisman <in...@gmail.com>.
Nice catch, this just happened to a user I have been working with, and we
didn't realize why. I had another issue brought up by a 2nd user that may
or may not have a JIRA, or this might the the perfect place to address it:

If you are planning on executing a vertex that does not mutate the graph at
all, but you do have data input that includes vertex id's and then a list
of out edges per vertex, this code should handle the situation where the
out-edges of one vertex in the data refer to a vertex that does not end up
having any out-edges of its own, and therefore is not mentioned in the
actual data list. such a vertex should be created (as it is in a mutable
algorithm when an new out edge is created to a vertex that does not yet
exist). The problem is like this:

VERT_ID  EDGE_LIST
1               3 4 57
2               1 4
3                4 2
4                ...
...
7  (end of data)

so 57 is mentioned as having an out edge, but there is no "line 57" in the
input data. Does that make sense? The final graph we process is not
mutable, algorithm doesn't mutate it, but we need to create 57 at the
beginning before processing starts, by the time of super step 0.

On Tue, Jul 10, 2012 at 5:40 AM, Sebastian Schelter (JIRA)
<ji...@apache.org>wrote:

> Sebastian Schelter created GIRAPH-245:
> -----------------------------------------
>
>              Summary: BasicRPCCommunications fails with custom vertices
>                  Key: GIRAPH-245
>                  URL: https://issues.apache.org/jira/browse/GIRAPH-245
>              Project: Giraph
>           Issue Type: Bug
>     Affects Versions: 0.2.0
>             Reporter: Sebastian Schelter
>
>
> BasicRPCCommunications assumes that every vertex is an instance of
> MutableVertex in line 1265:
>
> {noformat}
>       if (vertex != null) {
>         ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
>         partition.putVertex(vertex);
>       }
> {noformat}
>
> For custom vertices that only extend BasicVertex, this code fails with a
> ClassCastException
>
>
>
> --
> 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-245) BasicRPCCommunications fails with custom vertices

Posted by "Alessandro Presta (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GIRAPH-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alessandro Presta resolved GIRAPH-245.
--------------------------------------

    Resolution: Fixed

Fix included in GIRAPH-244
                
> BasicRPCCommunications fails with custom vertices
> -------------------------------------------------
>
>                 Key: GIRAPH-245
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-245
>             Project: Giraph
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Sebastian Schelter
>            Assignee: Alessandro Presta
>
> BasicRPCCommunications assumes that every vertex is an instance of MutableVertex in line 1265:
> {noformat} 
>       if (vertex != null) {
>         ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
>         partition.putVertex(vertex);
>       }
> {noformat} 
> For custom vertices that only extend BasicVertex, this code fails with a ClassCastException

--
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-245) BasicRPCCommunications fails with custom vertices

Posted by "Alessandro Presta (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GIRAPH-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alessandro Presta reassigned GIRAPH-245:
----------------------------------------

    Assignee: Alessandro Presta
    
> BasicRPCCommunications fails with custom vertices
> -------------------------------------------------
>
>                 Key: GIRAPH-245
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-245
>             Project: Giraph
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Sebastian Schelter
>            Assignee: Alessandro Presta
>
> BasicRPCCommunications assumes that every vertex is an instance of MutableVertex in line 1265:
> {noformat} 
>       if (vertex != null) {
>         ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
>         partition.putVertex(vertex);
>       }
> {noformat} 
> For custom vertices that only extend BasicVertex, this code fails with a ClassCastException

--
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-245) BasicRPCCommunications fails with custom vertices

Posted by "Maja Kabiljo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GIRAPH-245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13410320#comment-13410320 ] 

Maja Kabiljo commented on GIRAPH-245:
-------------------------------------

That piece of code only gets executed if there is a mutation, or if we receive a message for a vertexId which doesn't exist. None of these should happen if vertices are not mutable. But maybe we could add an informative message instead of crashing.

On a related note, in prepareSuperstep in NettyWorkerServer we will throw an IllegalStateException if we have a mutation to add a vertex and we received messages for that vertex (line 119). Is that a desired behavior?
                
> BasicRPCCommunications fails with custom vertices
> -------------------------------------------------
>
>                 Key: GIRAPH-245
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-245
>             Project: Giraph
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Sebastian Schelter
>
> BasicRPCCommunications assumes that every vertex is an instance of MutableVertex in line 1265:
> {noformat} 
>       if (vertex != null) {
>         ((MutableVertex<I, V, E, M>) vertex).setVertexId(vertexIndex);
>         partition.putVertex(vertex);
>       }
> {noformat} 
> For custom vertices that only extend BasicVertex, this code fails with a ClassCastException

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