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 BD61994EC for ; Mon, 14 Nov 2011 20:41:12 +0000 (UTC) Received: (qmail 41920 invoked by uid 500); 14 Nov 2011 20:41:12 -0000 Delivered-To: apmail-incubator-giraph-dev-archive@incubator.apache.org Received: (qmail 41891 invoked by uid 500); 14 Nov 2011 20:41:12 -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 41877 invoked by uid 99); 14 Nov 2011 20:41:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Nov 2011 20:41:12 +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; Mon, 14 Nov 2011 20:41: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 919A882568 for ; Mon, 14 Nov 2011 20:40:51 +0000 (UTC) Date: Mon, 14 Nov 2011 20:40:51 +0000 (UTC) From: "Avery Ching (Commented) (JIRA)" To: giraph-dev@incubator.apache.org Message-ID: <467918499.27980.1321303251597.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=13149891#comment-13149891 ] Avery Ching commented on GIRAPH-80: ----------------------------------- Seems reasonable to me. Having the option of foreach and iterator is nice. > 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