GIRAPH-1175
authorDionysios Logothetis <dlogothetis@gmail.com>
Tue, 13 Mar 2018 22:17:12 +0000 (15:17 -0700)
committerMaja Kabiljo <majakabiljo@fb.com>
Tue, 13 Mar 2018 23:13:08 +0000 (16:13 -0700)
closes #63

giraph-core/src/main/java/org/apache/giraph/ooc/data/DiskBackedPartitionStore.java

index 5514a4a..70e909d 100644 (file)
@@ -244,9 +244,11 @@ public class DiskBackedPartitionStore<I extends WritableComparable,
     I id = conf.createVertexId();
     id.readFields(in);
     Vertex<I, V, E> v = partition.getVertex(id);
-    checkNotNull(v, "Vertex with ID " + id + " not found in partition " +
-      partition.getId() + " which has " + partition.getVertexCount() +
-      " vertices and " + partition.getEdgeCount() + " edges.");
+    if (v == null) {
+      throw new IllegalStateException("Vertex with ID " + id + " not found in partition " +
+        partition.getId() + " which has " + partition.getVertexCount() +
+        " vertices and " + partition.getEdgeCount() + " edges.");
+    }
     OutEdges<I, E> edges = (OutEdges<I, E>) v.getEdges();
     edges.readFields(in);
     partition.saveVertex(v);