Skip to content

Commit

Permalink
HADOOP-12572. Update Hadoop's lz4 to r131. Contributed by Kevin Bowling.
Browse files Browse the repository at this point in the history
  • Loading branch information
Haohui Mai committed Nov 22, 2015
1 parent 6039059 commit 4c061e6
Show file tree
Hide file tree
Showing 10 changed files with 1,373 additions and 1,236 deletions.
6 changes: 3 additions & 3 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ For src/main/native/src/org/apache/hadoop/io/compress/lz4/{lz4.h,lz4.c,lz4hc.h,l
/*
LZ4 - Fast LZ compression algorithm
Header File
Copyright (C) 2011-2014, Yann Collet.
Copyright (C) 2011-2015, Yann Collet.

BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)

Redistribution and use in source and binary forms, with or without
Expand All @@ -284,11 +285,10 @@ For src/main/native/src/org/apache/hadoop/io/compress/lz4/{lz4.h,lz4.c,lz4hc.h,l
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

You can contact the author at :
- LZ4 source repository : http://code.google.com/p/lz4/
- LZ4 source repository : https://github.com/Cyan4973/lz4
- LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c
*/


For hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/gtest
---------------------------------------------------------------------
Copyright 2008, Google Inc.
Expand Down
2 changes: 2 additions & 0 deletions hadoop-common-project/hadoop-common/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,8 @@ Release 2.8.0 - UNRELEASED
HADOOP-12575. Add build instruction for docker toolbox instead of
boot2docker(Kai Sasaki via ozawa)

HADOOP-12572. Update Hadoop's lz4 to r131. (Kevin Bowling via wheat9)

OPTIMIZATIONS

HADOOP-11785. Reduce the number of listStatus operation in distcp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ JNIEXPORT jint JNICALL Java_org_apache_hadoop_io_compress_lz4_Lz4Compressor_comp
return (jint)0;
}

compressed_direct_buf_len = LZ4_compress(uncompressed_bytes, compressed_bytes, uncompressed_direct_buf_len);
compressed_direct_buf_len = LZ4_compress_default(uncompressed_bytes, compressed_bytes, uncompressed_direct_buf_len, LZ4_compressBound(uncompressed_direct_buf_len));
if (compressed_direct_buf_len < 0){
THROW(env, "java/lang/InternalError", "LZ4_compress failed");
}
Expand Down Expand Up @@ -115,7 +115,7 @@ JNIEXPORT jint JNICALL Java_org_apache_hadoop_io_compress_lz4_Lz4Compressor_comp
return (jint)0;
}

compressed_direct_buf_len = LZ4_compressHC(uncompressed_bytes, compressed_bytes, uncompressed_direct_buf_len);
compressed_direct_buf_len = LZ4_compress_HC(uncompressed_bytes, compressed_bytes, uncompressed_direct_buf_len, LZ4_compressBound(uncompressed_direct_buf_len), 0);
if (compressed_direct_buf_len < 0){
THROW(env, "java/lang/InternalError", "LZ4_compressHC failed");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ JNIEXPORT jint JNICALL Java_org_apache_hadoop_io_compress_lz4_Lz4Decompressor_de

uncompressed_direct_buf_len = LZ4_decompress_safe(compressed_bytes, uncompressed_bytes, compressed_direct_buf_len, uncompressed_direct_buf_len);
if (uncompressed_direct_buf_len < 0) {
THROW(env, "java/lang/InternalError", "LZ4_uncompress_unknownOutputSize failed.");
THROW(env, "java/lang/InternalError", "LZ4_decompress_safe failed.");
}

(*env)->SetIntField(env, thisj, Lz4Decompressor_compressedDirectBufLen, 0);
Expand Down
Loading

0 comments on commit 4c061e6

Please sign in to comment.