Repository: incubator-impala
Updated Branches:
  refs/heads/master 815c76f9c -> 637cc3e44


IMPALA-4926: Upgrade LZ4 to 1.7.5

LZ4 has deprecated the method names LZ4_compress and LZ4_uncompress, so
rename those to their new versions LZ4_compress_default() and
LZ4_decompress_fast() respectively. Otherwise no changes are required
for compatibility with LZ4 1.7.5.

Change-Id: I10e4561d0e940fa15ca8248c8277acfc6dff3da3
Reviewed-on: http://gerrit.cloudera.org:8080/6030
Reviewed-by: Jim Apple <[email protected]>
Tested-by: Impala Public Jenkins


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

Branch: refs/heads/master
Commit: d2ae45b0a9a566e19a4bf504680f43e15bc8b8a9
Parents: 815c76f
Author: Henry Robinson <[email protected]>
Authored: Mon Feb 13 17:31:57 2017 -0800
Committer: Impala Public Jenkins <[email protected]>
Committed: Sat Feb 18 04:33:07 2017 +0000

----------------------------------------------------------------------
 be/src/util/compress.cc   | 4 ++--
 be/src/util/decompress.cc | 4 ++--
 bin/impala-config.sh      | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/d2ae45b0/be/src/util/compress.cc
----------------------------------------------------------------------
diff --git a/be/src/util/compress.cc b/be/src/util/compress.cc
index 3737828..429ae66 100644
--- a/be/src/util/compress.cc
+++ b/be/src/util/compress.cc
@@ -299,7 +299,7 @@ Status Lz4Compressor::ProcessBlock(bool 
output_preallocated, int64_t input_lengt
   DCHECK_GE(input_length, 0);
   CHECK(output_preallocated) << "Output was not allocated for Lz4 Codec";
   if (input_length == 0) return Status::OK();
-  *output_length = LZ4_compress(reinterpret_cast<const char*>(input),
-                       reinterpret_cast<char*>(*output), input_length);
+  *output_length = LZ4_compress_default(reinterpret_cast<const char*>(input),
+      reinterpret_cast<char*>(*output), input_length, *output_length);
   return Status::OK();
 }

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/d2ae45b0/be/src/util/decompress.cc
----------------------------------------------------------------------
diff --git a/be/src/util/decompress.cc b/be/src/util/decompress.cc
index 7896c33..8897e98 100644
--- a/be/src/util/decompress.cc
+++ b/be/src/util/decompress.cc
@@ -559,9 +559,9 @@ int64_t Lz4Decompressor::MaxOutputLen(int64_t input_len, 
const uint8_t* input) {
 Status Lz4Decompressor::ProcessBlock(bool output_preallocated, int64_t 
input_length,
     const uint8_t* input, int64_t* output_length, uint8_t** output) {
   DCHECK(output_preallocated) << "Lz4 Codec implementation must have allocated 
output";
-  // LZ4_uncompress will cause a segmentation fault if passed a NULL output.
+  // LZ4_decompress_fast will cause a segmentation fault if passed a NULL 
output.
   if(*output_length == 0) return Status::OK();
-  if (LZ4_uncompress(reinterpret_cast<const char*>(input),
+  if (LZ4_decompress_fast(reinterpret_cast<const char*>(input),
           reinterpret_cast<char*>(*output), *output_length) != input_length) {
     return Status("Lz4: uncompress failed");
   }

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/d2ae45b0/bin/impala-config.sh
----------------------------------------------------------------------
diff --git a/bin/impala-config.sh b/bin/impala-config.sh
index 4a89432..1782577 100755
--- a/bin/impala-config.sh
+++ b/bin/impala-config.sh
@@ -72,7 +72,7 @@ fi
 # moving to a different build of the toolchain, e.g. when a version is bumped 
or a
 # compile option is changed. The build id can be found in the output of the 
toolchain
 # build jobs, it is constructed from the build number and toolchain git hash 
prefix.
-export IMPALA_TOOLCHAIN_BUILD_ID=339-7dba579b79
+export IMPALA_TOOLCHAIN_BUILD_ID=344-715ee51bdc
 
 # Versions of toolchain dependencies.
 # -----------------------------------
@@ -95,7 +95,7 @@ export IMPALA_LLVM_ASAN_VERSION=3.8.0-p1
 # Debug builds should use the release+asserts build to get additional coverage.
 # Don't use the LLVM debug build because the binaries are too large to 
distribute.
 export IMPALA_LLVM_DEBUG_VERSION=3.8.0-asserts-p1
-export IMPALA_LZ4_VERSION=svn
+export IMPALA_LZ4_VERSION=1.7.5
 export IMPALA_OPENLDAP_VERSION=2.4.25
 export IMPALA_OPENSSL_VERSION=0.9.8zf
 export IMPALA_PROTOBUF_VERSION=2.6.1

Reply via email to