Repository: tez
Updated Branches:
  refs/heads/master a51af593f -> a24652735


TEZ-3861. PipelineSorter setting negative progess (rbalamohan)


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

Branch: refs/heads/master
Commit: a24652735929af0b6ccd42c3ae097ae9847998f1
Parents: a51af59
Author: Rajesh Balamohan <[email protected]>
Authored: Thu Nov 2 03:36:15 2017 +0530
Committer: Rajesh Balamohan <[email protected]>
Committed: Thu Nov 2 03:36:15 2017 +0530

----------------------------------------------------------------------
 .../tez/runtime/library/common/sort/impl/PipelinedSorter.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/a2465273/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/PipelinedSorter.java
----------------------------------------------------------------------
diff --git 
a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/PipelinedSorter.java
 
b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/PipelinedSorter.java
index 07c2fe2..c4782f6 100644
--- 
a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/PipelinedSorter.java
+++ 
b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/PipelinedSorter.java
@@ -1122,10 +1122,10 @@ public class PipelinedSorter extends ExternalSorter {
     public boolean next() {
       // caveat: since we use this as a comparable in the merger 
       if(kvindex == maxindex) return false;
+      kvindex += 1;
       if(kvindex % 100 == 0) {
-          progress.set((kvindex-maxindex) / (float)maxindex);
+        progress.set(1 - ((maxindex - kvindex) / (float) maxindex));
       }
-      kvindex += 1;
       return true;
     }
 

Reply via email to