You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by rb...@apache.org on 2014/11/06 02:35:18 UTC
git commit: TEZ-1733. TezMerger should sort FileChunks on size when
merging (Prakash Ramachandran via Rajesh Balamohan)
Repository: tez
Updated Branches:
refs/heads/master cd0ed751a -> 93687aeec
TEZ-1733. TezMerger should sort FileChunks on size when merging (Prakash Ramachandran via Rajesh Balamohan)
Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/93687aee
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/93687aee
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/93687aee
Branch: refs/heads/master
Commit: 93687aeec59263d949e8a66d6d78f812b93f3bdf
Parents: cd0ed75
Author: Rajesh Balamohan <rb...@apache.org>
Authored: Wed Nov 5 17:32:41 2014 -0800
Committer: Rajesh Balamohan <rb...@apache.org>
Committed: Wed Nov 5 17:34:12 2014 -0800
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../src/main/java/org/apache/hadoop/io/FileChunk.java | 12 ++++++------
2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tez/blob/93687aee/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index adb4352..1b0a2d9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,7 @@ Release 0.6.0: Unreleased
INCOMPATIBLE CHANGES
ALL CHANGES:
+ TEZ-1733. TezMerger should sort FileChunks on size when merging
Release 0.5.2: Unreleased
http://git-wip-us.apache.org/repos/asf/tez/blob/93687aee/tez-runtime-library/src/main/java/org/apache/hadoop/io/FileChunk.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/main/java/org/apache/hadoop/io/FileChunk.java b/tez-runtime-library/src/main/java/org/apache/hadoop/io/FileChunk.java
index 0ba39e2..e7a5c24 100644
--- a/tez-runtime-library/src/main/java/org/apache/hadoop/io/FileChunk.java
+++ b/tez-runtime-library/src/main/java/org/apache/hadoop/io/FileChunk.java
@@ -72,22 +72,22 @@ public class FileChunk implements Comparable<FileChunk> {
@Override
public int compareTo(FileChunk that) {
+ long lc;
+ lc = length - that.length;
+ if (lc != 0) {
+ return lc < 0 ? -1 : 1;
+ }
+
int c = path.compareTo(that.path);
if (c != 0) {
return c;
}
- long lc;
lc = offset - that.offset;
if (lc != 0) {
return lc < 0 ? -1 : 1;
}
- lc = length - that.length;
- if (lc != 0) {
- return lc < 0 ? -1 : 1;
- }
-
return 0;
}