You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2015/10/16 22:18:02 UTC

hive git commit: HIVE-12198 : LLAP: reader failures when querying uncompressed data (Sergey Shelukhin, reviewed by Vikram Dixit K)

Repository: hive
Updated Branches:
  refs/heads/master c97f518d8 -> 20ad5b391


HIVE-12198 : LLAP: reader failures when querying uncompressed data (Sergey Shelukhin, reviewed by Vikram Dixit K)


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

Branch: refs/heads/master
Commit: 20ad5b3910373d069d8172af95a5214c1f60178f
Parents: c97f518
Author: Sergey Shelukhin <se...@apache.org>
Authored: Fri Oct 16 13:17:09 2015 -0700
Committer: Sergey Shelukhin <se...@apache.org>
Committed: Fri Oct 16 13:17:09 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java | 2 +-
 .../hadoop/hive/ql/io/orc/encoded/EncodedReaderImpl.java       | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/20ad5b39/llap-server/src/java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java
----------------------------------------------------------------------
diff --git a/llap-server/src/java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java b/llap-server/src/java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java
index 08a6ca8..ae64d20 100644
--- a/llap-server/src/java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java
+++ b/llap-server/src/java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java
@@ -282,7 +282,7 @@ public final class BuddyAllocator implements EvictionAwareAllocator, BuddyAlloca
           int nextHeaderIx = freeList.listHead;
           while (nextHeaderIx >= 0) {
             result.append(nextHeaderIx + ", ");
-            nextHeaderIx = data.getInt(offsetFromHeaderIndex(nextHeaderIx));
+            nextHeaderIx = getNextFreeListItem(offsetFromHeaderIndex(nextHeaderIx));
           }
         } finally {
           freeList.lock.unlock();

http://git-wip-us.apache.org/repos/asf/hive/blob/20ad5b39/ql/src/java/org/apache/hadoop/hive/ql/io/orc/encoded/EncodedReaderImpl.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/encoded/EncodedReaderImpl.java b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/encoded/EncodedReaderImpl.java
index b1477e7..0d3b64c 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/encoded/EncodedReaderImpl.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/encoded/EncodedReaderImpl.java
@@ -956,16 +956,16 @@ class EncodedReaderImpl implements EncodedReader {
   private static void copyAndReplaceUncompressedChunks(
       UncompressedCacheChunk candidateCached, ByteBuffer dest, CacheChunk tcc) {
     int startPos = dest.position(), startLim = dest.limit();
-    BufferChunk chunk = candidateCached.getChunk();
+    DiskRangeList next = null;
     for (int i = 0; i < candidateCached.getCount(); ++i) {
+      BufferChunk chunk = (i == 0) ? candidateCached.getChunk() : (BufferChunk)next;
       dest.put(chunk.getData());
-      BufferChunk next = (BufferChunk)(chunk.next);
+      next = chunk.next;
       if (i == 0) {
         chunk.replaceSelfWith(tcc);
       } else {
         chunk.removeSelf();
       }
-      chunk = next;
     }
     int newPos = dest.position();
     if (newPos > startLim) {