You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@giraph.apache.org by ed...@apache.org on 2016/06/11 00:41:15 UTC
git commit: updated refs/heads/trunk to 5068b6f
Repository: giraph
Updated Branches:
refs/heads/trunk fe87b23fb -> 5068b6f00
GIRAPH-1070 Comparators in PartitionUtils can overflow
Test Plan: mvn clean verify
Reviewers: majakabiljo, maja.kabiljo, dionysis.logothetis, heslami
Reviewed By: heslami
Differential Revision: https://reviews.facebook.net/D59547
Project: http://git-wip-us.apache.org/repos/asf/giraph/repo
Commit: http://git-wip-us.apache.org/repos/asf/giraph/commit/5068b6f0
Tree: http://git-wip-us.apache.org/repos/asf/giraph/tree/5068b6f0
Diff: http://git-wip-us.apache.org/repos/asf/giraph/diff/5068b6f0
Branch: refs/heads/trunk
Commit: 5068b6f0082a020a6124cd7e652558efe3ec5f37
Parents: fe87b23
Author: Sergey Edunov <ed...@fb.com>
Authored: Fri Jun 10 17:41:02 2016 -0700
Committer: Sergey Edunov <ed...@fb.com>
Committed: Fri Jun 10 17:41:02 2016 -0700
----------------------------------------------------------------------
.../main/java/org/apache/giraph/partition/PartitionUtils.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/giraph/blob/5068b6f0/giraph-core/src/main/java/org/apache/giraph/partition/PartitionUtils.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/partition/PartitionUtils.java b/giraph-core/src/main/java/org/apache/giraph/partition/PartitionUtils.java
index e4305ff..b607ed2 100644
--- a/giraph-core/src/main/java/org/apache/giraph/partition/PartitionUtils.java
+++ b/giraph-core/src/main/java/org/apache/giraph/partition/PartitionUtils.java
@@ -64,7 +64,7 @@ public class PartitionUtils {
@Override
public int compare(Entry<WorkerInfo, VertexEdgeCount> worker1,
Entry<WorkerInfo, VertexEdgeCount> worker2) {
- return (int) (worker1.getValue().getEdgeCount() -
+ return Long.compare(worker1.getValue().getEdgeCount(),
worker2.getValue().getEdgeCount());
}
}
@@ -81,7 +81,7 @@ public class PartitionUtils {
@Override
public int compare(Entry<WorkerInfo, VertexEdgeCount> worker1,
Entry<WorkerInfo, VertexEdgeCount> worker2) {
- return (int) (worker1.getValue().getVertexCount() -
+ return Long.compare(worker1.getValue().getVertexCount(),
worker2.getValue().getVertexCount());
}
}