You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by go...@apache.org on 2014/03/25 20:36:18 UTC

git commit: TEZ-8649. Fix BufferOverflow in PipelinedSorter by ensuring the last block is big enough for one k, v pair (gopalv)

Repository: incubator-tez
Updated Branches:
  refs/heads/master 762f322de -> e22256ddf


TEZ-8649. Fix BufferOverflow in PipelinedSorter by ensuring the last block is big enough for one k,v pair
(gopalv)


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

Branch: refs/heads/master
Commit: e22256ddf49154748ce84ad8d98bf8a365c68bc6
Parents: 762f322
Author: Gopal V <go...@apache.org>
Authored: Tue Mar 25 12:33:09 2014 -0700
Committer: Gopal V <go...@apache.org>
Committed: Tue Mar 25 12:33:09 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/e22256dd/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 54a6e8e..220da50 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
@@ -582,7 +582,7 @@ public class PipelinedSorter extends ExternalSorter {
       }
       int perItem = kvbuffer.position()/items;
       LOG.info(String.format("Span%d.length = %d, perItem = %d", index, length(), perItem));
-      if(remaining.remaining() < NMETA+perItem) {
+      if(remaining.remaining() < METASIZE+perItem) {
         return null;
       }
       return remaining;