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 C68ED93BB for ; Mon, 14 Nov 2011 20:33:15 +0000 (UTC) Received: (qmail 36306 invoked by uid 500); 14 Nov 2011 20:33:15 -0000 Delivered-To: apmail-incubator-giraph-dev-archive@incubator.apache.org Received: (qmail 36279 invoked by uid 500); 14 Nov 2011 20:33:15 -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 36271 invoked by uid 99); 14 Nov 2011 20:33:15 -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:33:15 +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:33:14 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 37119821B7 for ; Mon, 14 Nov 2011 20:32:54 +0000 (UTC) Date: Mon, 14 Nov 2011 20:32:54 +0000 (UTC) From: "Jake Mannix (Commented) (JIRA)" To: giraph-dev@incubator.apache.org Message-ID: <1241704532.27972.1321302774229.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=13149887#comment-13149887 ] Jake Mannix commented on GIRAPH-80: ----------------------------------- Can we change both addMessages() and getMessages() to take/return Iterable? That way it can be scanned multiple times without multiple calls to the vertex. void abstract addMessages(Iterable messages); Iterable abstract getMessages(); > 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