Updated Branches:
  refs/heads/trunk 5d3f3c113 -> cd16dac76

GIRAPH-605: Worker crashes if its vertices have no edges when using edge input 
(majakabiljo)


Project: http://git-wip-us.apache.org/repos/asf/giraph/repo
Commit: http://git-wip-us.apache.org/repos/asf/giraph/commit/cd16dac7
Tree: http://git-wip-us.apache.org/repos/asf/giraph/tree/cd16dac7
Diff: http://git-wip-us.apache.org/repos/asf/giraph/diff/cd16dac7

Branch: refs/heads/trunk
Commit: cd16dac76ba87780fa3195b73264fb050d079a9b
Parents: 5d3f3c1
Author: Maja Kabiljo <[email protected]>
Authored: Thu Apr 4 16:51:52 2013 -0700
Committer: Maja Kabiljo <[email protected]>
Committed: Thu Apr 4 16:51:52 2013 -0700

----------------------------------------------------------------------
 CHANGELOG                                          |    2 ++
 .../java/org/apache/giraph/edge/EdgeStore.java     |    7 +++++++
 2 files changed, 9 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/giraph/blob/cd16dac7/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 35303fa..d619155 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,8 @@
 Giraph Change Log
 
 Release 0.2.0 - unreleased
+  GIRAPH-605: Worker crashes if its vertices have no edges when using edge 
input (majakabiljo)
+
   GIRAPH-603: AbstractVertexToHive doesn't need message type (majakabiljo)
 
   GIRAPH-589: Remove unnecessary generics from input formats (majakabiljo)

http://git-wip-us.apache.org/repos/asf/giraph/blob/cd16dac7/giraph-core/src/main/java/org/apache/giraph/edge/EdgeStore.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/edge/EdgeStore.java 
b/giraph-core/src/main/java/org/apache/giraph/edge/EdgeStore.java
index 3101211..d6653d0 100644
--- a/giraph-core/src/main/java/org/apache/giraph/edge/EdgeStore.java
+++ b/giraph-core/src/main/java/org/apache/giraph/edge/EdgeStore.java
@@ -163,6 +163,13 @@ public class EdgeStore<I extends WritableComparable,
    * Note: this method is not thread-safe.
    */
   public void moveEdgesToVertices() {
+    if (transientEdges.isEmpty()) {
+      if (LOG.isInfoEnabled()) {
+        LOG.info("moveEdgesToVertices: No edges to move");
+      }
+      return;
+    }
+
     if (LOG.isInfoEnabled()) {
       LOG.info("moveEdgesToVertices: Moving incoming edges to vertices.");
     }

Reply via email to