Return-Path: X-Original-To: apmail-hama-commits-archive@www.apache.org Delivered-To: apmail-hama-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CCB9FDAF1 for ; Mon, 20 Aug 2012 11:05:19 +0000 (UTC) Received: (qmail 21234 invoked by uid 500); 20 Aug 2012 11:05:19 -0000 Delivered-To: apmail-hama-commits-archive@hama.apache.org Received: (qmail 21132 invoked by uid 500); 20 Aug 2012 11:05:16 -0000 Mailing-List: contact commits-help@hama.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hama.apache.org Delivered-To: mailing list commits@hama.apache.org Received: (qmail 21103 invoked by uid 99); 20 Aug 2012 11:05:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Aug 2012 11:05:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Aug 2012 11:05:14 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 6BE5323888E4 for ; Mon, 20 Aug 2012 11:04:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1374968 - /hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java Date: Mon, 20 Aug 2012 11:04:30 -0000 To: commits@hama.apache.org From: tjungblut@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120820110430.6BE5323888E4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tjungblut Date: Mon Aug 20 11:04:30 2012 New Revision: 1374968 URL: http://svn.apache.org/viewvc?rev=1374968&view=rev Log: revert the revert Modified: hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java Modified: hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java URL: http://svn.apache.org/viewvc/hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java?rev=1374968&r1=1374967&r2=1374968&view=diff ============================================================================== --- hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java (original) +++ hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java Mon Aug 20 11:04:30 2012 @@ -391,16 +391,16 @@ public final class GraphJobRunner vertex = newVertexInstance(vertexClass, conf); vertex.setPeer(peer); vertex.runner = this; - while (true) { - KeyValuePair next = peer.readNext(); - if (next == null) { - break; - } + + KeyValuePair next = null; + int lines = 0; + while ((next = peer.readNext()) != null) { boolean vertexFinished = reader.parseVertex(next.getKey(), next.getValue(), vertex); if (!vertexFinished) { continue; } + if (vertex.getEdges() == null) { vertex.setEdges(new ArrayList>(0)); } @@ -420,12 +420,26 @@ public final class GraphJobRunner messagedVertex = (Vertex) msg.getVertex(); + messagedVertex.setPeer(peer); + messagedVertex.runner = this; + messagedVertex.setup(conf); + vertices.put(messagedVertex.getVertexID(), messagedVertex); + } + } } if (runtimePartitioning) { @@ -440,6 +454,8 @@ public final class GraphJobRunner