tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject git commit: TEZ-1385. Disk Direct fails for MapOutput when trying to use OnDiskMerger. Contributed by Prakash Ramachandran.
Date Thu, 07 Aug 2014 09:05:53 GMT
Repository: tez
Updated Branches:
  refs/heads/master 78e1bc3a4 -> 548d813e5


TEZ-1385. Disk Direct fails for MapOutput when trying to use
OnDiskMerger. Contributed by Prakash Ramachandran.


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

Branch: refs/heads/master
Commit: 548d813e5378a6a749827de04c0bbc9daaf21204
Parents: 78e1bc3
Author: Siddharth Seth <sseth@apache.org>
Authored: Thu Aug 7 02:04:37 2014 -0700
Committer: Siddharth Seth <sseth@apache.org>
Committed: Thu Aug 7 02:04:37 2014 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/io/FileChunkPath.java    | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/548d813e/tez-runtime-library/src/main/java/org/apache/hadoop/io/FileChunkPath.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/hadoop/io/FileChunkPath.java b/tez-runtime-library/src/main/java/org/apache/hadoop/io/FileChunkPath.java
index dddcdf5..dfc00f5 100644
--- a/tez-runtime-library/src/main/java/org/apache/hadoop/io/FileChunkPath.java
+++ b/tez-runtime-library/src/main/java/org/apache/hadoop/io/FileChunkPath.java
@@ -40,13 +40,19 @@ public class FileChunkPath extends Path {
     if (this == o) {
       return true;
     }
-    if (o == null || getClass() != o.getClass() || !super.equals(o)) {
+
+    if (o == null) {
       return false;
     }
 
+    boolean isPathEqual = super.equals(o);
+    if (!isPathEqual || !(o instanceof FileChunkPath)) {
+      return isPathEqual;
+    }
+
     FileChunkPath that = (FileChunkPath) o;
 
-    if (offset != that.offset || size != that.size) {
+    if (this.offset != that.offset || this.size != that.size) {
       return false;
     }
 
@@ -63,14 +69,16 @@ public class FileChunkPath extends Path {
 
   @Override
   public int compareTo(Object o) {
-    FileChunkPath that = (FileChunkPath)o;
     int c;
 
-    if ((c = super.compareTo(o)) != 0) {
+    c = super.compareTo(o);
+    if (c != 0 || !(o instanceof FileChunkPath)) {
       return c;
     }
 
     long lc;
+    FileChunkPath that = (FileChunkPath)o;
+
     if ((lc = this.offset - that.offset) != 0) {
       return lc > 0 ? 1 : -1;
     }


Mime
View raw message