Return-Path: X-Original-To: apmail-giraph-dev-archive@www.apache.org Delivered-To: apmail-giraph-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 75947F820 for ; Wed, 20 Mar 2013 21:21:18 +0000 (UTC) Received: (qmail 81435 invoked by uid 500); 20 Mar 2013 21:21:17 -0000 Delivered-To: apmail-giraph-dev-archive@giraph.apache.org Received: (qmail 81397 invoked by uid 500); 20 Mar 2013 21:21:17 -0000 Mailing-List: contact dev-help@giraph.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@giraph.apache.org Delivered-To: mailing list dev@giraph.apache.org Received: (qmail 81364 invoked by uid 500); 20 Mar 2013 21:21:17 -0000 Delivered-To: apmail-incubator-giraph-dev@incubator.apache.org Received: (qmail 81350 invoked by uid 99); 20 Mar 2013 21:21:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Mar 2013 21:21:17 +0000 Date: Wed, 20 Mar 2013 21:21:17 +0000 (UTC) From: "Hudson (JIRA)" To: giraph-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GIRAPH-547) Allow in-place modification of edges MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/GIRAPH-547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13608241#comment-13608241 ] Hudson commented on GIRAPH-547: ------------------------------- Integrated in Giraph-trunk-Commit #814 (See [https://builds.apache.org/job/Giraph-trunk-Commit/814/]) GIRAPH-547: Allow in-place modification of edges (apresta) (Revision 5bb956cad2d9c4beded036553f715f0e3156d665) Result = FAILURE alessandro : http://git-wip-us.apache.org/repos/asf?p=giraph.git&a=commit&h=5bb956cad2d9c4beded036553f715f0e3156d665 Files : * giraph-core/src/main/java/org/apache/giraph/edge/LongNullHashSetEdges.java * giraph-core/src/main/java/org/apache/giraph/edge/MutableEdgesWrapper.java * giraph-core/src/main/java/org/apache/giraph/edge/MapMutableEdge.java * giraph-core/src/main/java/org/apache/giraph/edge/EdgeNoValue.java * giraph-core/src/main/java/org/apache/giraph/edge/MutableEdge.java * giraph-core/src/main/java/org/apache/giraph/conf/ImmutableClassesGiraphConfiguration.java * giraph-core/src/main/java/org/apache/giraph/edge/LongDoubleArrayEdges.java * giraph-core/src/main/java/org/apache/giraph/edge/ReusableEdge.java * giraph-core/src/main/java/org/apache/giraph/edge/MutableEdgesIterable.java * giraph-core/src/test/java/org/apache/giraph/edge/TestNullValueEdges.java * giraph-core/src/test/java/org/apache/giraph/graph/TestVertexAndEdges.java * giraph-core/src/main/java/org/apache/giraph/edge/LongDoubleHashMapEdges.java * giraph-core/src/main/java/org/apache/giraph/edge/ByteArrayEdges.java * giraph-core/src/main/java/org/apache/giraph/edge/HashMultimapEdges.java * giraph-core/src/main/java/org/apache/giraph/edge/ArrayListEdges.java * giraph-core/src/main/java/org/apache/giraph/edge/StrictRandomAccessVertexEdges.java * giraph-hive/src/main/java/org/apache/giraph/hive/input/edge/HiveEdgeReader.java * giraph-core/src/main/java/org/apache/giraph/graph/Vertex.java * giraph-core/src/main/java/org/apache/giraph/edge/EdgeFactory.java * giraph-core/src/main/java/org/apache/giraph/utils/PairListWritable.java * giraph-core/src/main/java/org/apache/giraph/graph/ComputeCallable.java * giraph-core/src/main/java/org/apache/giraph/edge/EdgeStore.java * giraph-core/src/main/java/org/apache/giraph/edge/MutableVertexEdges.java * CHANGELOG * giraph-core/src/main/java/org/apache/giraph/edge/LongNullArrayEdges.java * giraph-core/src/main/java/org/apache/giraph/edge/DefaultEdge.java * giraph-core/src/test/java/org/apache/giraph/edge/TestStrictRandomAccessEdges.java * giraph-core/src/main/java/org/apache/giraph/utils/ByteArrayVertexIdEdges.java * giraph-core/src/main/java/org/apache/giraph/edge/HashMapEdges.java > Allow in-place modification of edges > ------------------------------------ > > Key: GIRAPH-547 > URL: https://issues.apache.org/jira/browse/GIRAPH-547 > Project: Giraph > Issue Type: New Feature > Reporter: Alessandro Presta > Assignee: Alessandro Presta > Attachments: GIRAPH-547.patch > > > This is a somewhat long term item. > Because of some optimized edge storage implementations (byte array, primitive array), we have a contract with the user that Edge objects returned by getEdges() are read-only. > One concrete example where in-place modification would be useful: in the weighted version of PageRank, you can store the weight sum and normalize each message sent, or you could more efficiently normalize the out-edges once in superstep 0. > The Pregel paper describes an OutEdgeIterator that allows for in-place modification of edges. I can see how that would be easy to implement in C++, where there is no need to reuse objects. > Giraph "unofficially" supports this if one is using generic collections to represent edges (e.g. ArrayList or HashMap). > It may be trickier in some optimized implementations, but in principle it should be doable. > One way would be to have some special MutableEdge implementation which calls back to the edge data structure in order to save modifications: > {code} > for (Edge edge : getEdges()) { > edge.setValue(newValue); > } > {code} > Another option would be to add a special set() method to our edge iterator, where one can replace the current edge: > {code} > for (EdgeIterator it = getEdges().iterator(); it.hasNext();) { > Edge edge = it.next(); > edge.setValue(newValue); > it.set(edge); > } > {code} > We could actually implement the first version as syntactic sugar on top of the second version (the special MutableEdge would need a reference to the iterator in order to call set(this)). -- 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