You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@giraph.apache.org by "Alessandro Presta (JIRA)" <ji...@apache.org> on 2012/10/17 00:29:03 UTC

[jira] [Created] (GIRAPH-375) Cleaner MutableVertex API

Alessandro Presta created GIRAPH-375:
----------------------------------------

             Summary: Cleaner MutableVertex API
                 Key: GIRAPH-375
                 URL: https://issues.apache.org/jira/browse/GIRAPH-375
             Project: Giraph
          Issue Type: Improvement
            Reporter: Alessandro Presta
            Assignee: Alessandro Presta
         Attachments: GIRAPH-375.patch

Currently, MutableVertex requires the user to instantiate a vertex before creating the request.
Using instantiateVertex() also requires a downcast to MutableVertex.

What we can do instead is pass id and value (and optionally edges) to addVertexRequest(), and the instantiation/initialization will happen internally and safely.

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

[jira] [Updated] (GIRAPH-375) Cleaner MutableVertex API

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

Alessandro Presta updated GIRAPH-375:
-------------------------------------

    Attachment: GIRAPH-375.patch

Switching to Collections.emptyMap() in a couple places.
                
> Cleaner MutableVertex API
> -------------------------
>
>                 Key: GIRAPH-375
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-375
>             Project: Giraph
>          Issue Type: Improvement
>            Reporter: Alessandro Presta
>            Assignee: Alessandro Presta
>         Attachments: GIRAPH-375.patch, GIRAPH-375.patch, GIRAPH-375.patch
>
>
> Currently, MutableVertex requires the user to instantiate a vertex before creating the request.
> Using instantiateVertex() also requires a downcast to MutableVertex.
> What we can do instead is pass id and value (and optionally edges) to addVertexRequest(), and the instantiation/initialization will happen internally and safely.

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

[jira] [Commented] (GIRAPH-375) Cleaner MutableVertex API

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

Alessandro Presta commented on GIRAPH-375:
------------------------------------------

Thanks for the quick review. Committing now since it's a pretty simple change.
                
> Cleaner MutableVertex API
> -------------------------
>
>                 Key: GIRAPH-375
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-375
>             Project: Giraph
>          Issue Type: Improvement
>            Reporter: Alessandro Presta
>            Assignee: Alessandro Presta
>         Attachments: GIRAPH-375.patch, GIRAPH-375.patch, GIRAPH-375.patch
>
>
> Currently, MutableVertex requires the user to instantiate a vertex before creating the request.
> Using instantiateVertex() also requires a downcast to MutableVertex.
> What we can do instead is pass id and value (and optionally edges) to addVertexRequest(), and the instantiation/initialization will happen internally and safely.

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

[jira] [Updated] (GIRAPH-375) Cleaner MutableVertex API

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

Alessandro Presta updated GIRAPH-375:
-------------------------------------

    Attachment: GIRAPH-375.patch
    
> Cleaner MutableVertex API
> -------------------------
>
>                 Key: GIRAPH-375
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-375
>             Project: Giraph
>          Issue Type: Improvement
>            Reporter: Alessandro Presta
>            Assignee: Alessandro Presta
>         Attachments: GIRAPH-375.patch
>
>
> Currently, MutableVertex requires the user to instantiate a vertex before creating the request.
> Using instantiateVertex() also requires a downcast to MutableVertex.
> What we can do instead is pass id and value (and optionally edges) to addVertexRequest(), and the instantiation/initialization will happen internally and safely.

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

[jira] [Updated] (GIRAPH-375) Cleaner MutableVertex API

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

Alessandro Presta updated GIRAPH-375:
-------------------------------------

    Attachment: GIRAPH-375.patch

Makes sense. I somehow thought it would be better to call the version of initialize() without edges, but actually this is equivalent.
                
> Cleaner MutableVertex API
> -------------------------
>
>                 Key: GIRAPH-375
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-375
>             Project: Giraph
>          Issue Type: Improvement
>            Reporter: Alessandro Presta
>            Assignee: Alessandro Presta
>         Attachments: GIRAPH-375.patch, GIRAPH-375.patch
>
>
> Currently, MutableVertex requires the user to instantiate a vertex before creating the request.
> Using instantiateVertex() also requires a downcast to MutableVertex.
> What we can do instead is pass id and value (and optionally edges) to addVertexRequest(), and the instantiation/initialization will happen internally and safely.

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

[jira] [Commented] (GIRAPH-375) Cleaner MutableVertex API

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

Hudson commented on GIRAPH-375:
-------------------------------

Integrated in Giraph-trunk-Commit #243 (See [https://builds.apache.org/job/Giraph-trunk-Commit/243/])
    GIRAPH-375: Cleaner MutableVertex API (apresta) (Revision 1399043)

     Result = SUCCESS
apresta : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1399043
Files : 
* /giraph/trunk/CHANGELOG
* /giraph/trunk/giraph/src/main/java/org/apache/giraph/examples/SimpleMutateGraphVertex.java
* /giraph/trunk/giraph/src/main/java/org/apache/giraph/graph/MutableVertex.java
* /giraph/trunk/giraph/src/main/java/org/apache/giraph/graph/Vertex.java

                
> Cleaner MutableVertex API
> -------------------------
>
>                 Key: GIRAPH-375
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-375
>             Project: Giraph
>          Issue Type: Improvement
>            Reporter: Alessandro Presta
>            Assignee: Alessandro Presta
>         Attachments: GIRAPH-375.patch, GIRAPH-375.patch, GIRAPH-375.patch
>
>
> Currently, MutableVertex requires the user to instantiate a vertex before creating the request.
> Using instantiateVertex() also requires a downcast to MutableVertex.
> What we can do instead is pass id and value (and optionally edges) to addVertexRequest(), and the instantiation/initialization will happen internally and safely.

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

[jira] [Commented] (GIRAPH-375) Cleaner MutableVertex API

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

Avery Ching commented on GIRAPH-375:
------------------------------------

+1!  Thanks!  I also ran with mvn clean install and it looks good.
                
> Cleaner MutableVertex API
> -------------------------
>
>                 Key: GIRAPH-375
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-375
>             Project: Giraph
>          Issue Type: Improvement
>            Reporter: Alessandro Presta
>            Assignee: Alessandro Presta
>         Attachments: GIRAPH-375.patch, GIRAPH-375.patch, GIRAPH-375.patch
>
>
> Currently, MutableVertex requires the user to instantiate a vertex before creating the request.
> Using instantiateVertex() also requires a downcast to MutableVertex.
> What we can do instead is pass id and value (and optionally edges) to addVertexRequest(), and the instantiation/initialization will happen internally and safely.

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

[jira] [Commented] (GIRAPH-375) Cleaner MutableVertex API

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

Avery Ching commented on GIRAPH-375:
------------------------------------

Looks good, I would make one change

I would implement 

public void addVertexRequest(I id, V value) throws IOException
using 
public void addVertexRequest(I id, V value, Map<I, E> edges)

to reduce code duplication.
                
> Cleaner MutableVertex API
> -------------------------
>
>                 Key: GIRAPH-375
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-375
>             Project: Giraph
>          Issue Type: Improvement
>            Reporter: Alessandro Presta
>            Assignee: Alessandro Presta
>         Attachments: GIRAPH-375.patch
>
>
> Currently, MutableVertex requires the user to instantiate a vertex before creating the request.
> Using instantiateVertex() also requires a downcast to MutableVertex.
> What we can do instead is pass id and value (and optionally edges) to addVertexRequest(), and the instantiation/initialization will happen internally and safely.

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

[jira] [Commented] (GIRAPH-375) Cleaner MutableVertex API

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

Avery Ching commented on GIRAPH-375:
------------------------------------

How about 

Collections.emptyMap() instead of Maps.<I, E>newHashMapWithExpectedSize(0)?

                
> Cleaner MutableVertex API
> -------------------------
>
>                 Key: GIRAPH-375
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-375
>             Project: Giraph
>          Issue Type: Improvement
>            Reporter: Alessandro Presta
>            Assignee: Alessandro Presta
>         Attachments: GIRAPH-375.patch, GIRAPH-375.patch
>
>
> Currently, MutableVertex requires the user to instantiate a vertex before creating the request.
> Using instantiateVertex() also requires a downcast to MutableVertex.
> What we can do instead is pass id and value (and optionally edges) to addVertexRequest(), and the instantiation/initialization will happen internally and safely.

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