Return-Path: X-Original-To: apmail-incubator-giraph-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-giraph-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5BBA6742B for ; Tue, 15 Nov 2011 10:57:13 +0000 (UTC) Received: (qmail 1554 invoked by uid 500); 15 Nov 2011 10:57:13 -0000 Delivered-To: apmail-incubator-giraph-dev-archive@incubator.apache.org Received: (qmail 1492 invoked by uid 500); 15 Nov 2011 10:57:13 -0000 Mailing-List: contact giraph-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: giraph-dev@incubator.apache.org Delivered-To: mailing list giraph-dev@incubator.apache.org Received: (qmail 1483 invoked by uid 99); 15 Nov 2011 10:57:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2011 10:57:13 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2011 10:57:11 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id AE52C850A1 for ; Tue, 15 Nov 2011 10:56:51 +0000 (UTC) Date: Tue, 15 Nov 2011 10:56:51 +0000 (UTC) From: "Claudio Martella (Commented) (JIRA)" To: giraph-dev@incubator.apache.org Message-ID: <179756806.30468.1321354611715.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <632225504.27049.1321287352141.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (GIRAPH-80) Don't expose the list holding the messages in BasicVertex 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-80?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13150372#comment-13150372 ] Claudio Martella commented on GIRAPH-80: ---------------------------------------- I favor the Iterable approach, as suggested by Jake, too. I was going to file this same JIRA today, good job Sebastian :) > Don't expose the list holding the messages in BasicVertex > --------------------------------------------------------- > > Key: GIRAPH-80 > URL: https://issues.apache.org/jira/browse/GIRAPH-80 > Project: Giraph > Issue Type: Improvement > Affects Versions: 0.70.0 > Reporter: Sebastian Schelter > > I'm currently trying to implement my own memory efficient vertex (similar to LongDoubleFloatDoubleVertex) and ran into problems with getMsgList() > This method returns a list pointing to the messages of the vertex and it is modified externally (BasicRPCCommunications calls clear() and addAll() e.g.). This makes it very hard to use something else than a java.util.List internally (LongDoubleFloatDoubleVertex "hacked" around this) and it is generally dangerous to have the internal state of an object be modified externally. It also makes the code harder to read and understand. > I'd suggest to change the API to let a vertex handle the modifications itself internally (e.g. add something like pushMessages(...)) -- 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