diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index bbd4ef3ced8..144c296fd3e 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -47,6 +47,9 @@ Release 2.7.2 - UNRELEASED HADOOP-12213. Interrupted exception can occur when Client#stop is called. (Kuhu Shukla via ozawa) + HADOOP-8151. Error handling in snappy decompressor throws invalid + exceptions. (Matt Foley via harsh) + Release 2.7.1 - 2015-07-06 INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/Lz4Compressor.c b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/Lz4Compressor.c index 58544f537bc..9f14312cde3 100644 --- a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/Lz4Compressor.c +++ b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/Lz4Compressor.c @@ -83,7 +83,7 @@ JNIEXPORT jint JNICALL Java_org_apache_hadoop_io_compress_lz4_Lz4Compressor_comp compressed_direct_buf_len = LZ4_compress(uncompressed_bytes, compressed_bytes, uncompressed_direct_buf_len); if (compressed_direct_buf_len < 0){ - THROW(env, "Ljava/lang/InternalError", "LZ4_compress failed"); + THROW(env, "java/lang/InternalError", "LZ4_compress failed"); } (*env)->SetIntField(env, thisj, Lz4Compressor_uncompressedDirectBufLen, 0); diff --git a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/Lz4Decompressor.c b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/Lz4Decompressor.c index 6570303d027..2b8c91c348b 100644 --- a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/Lz4Decompressor.c +++ b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/Lz4Decompressor.c @@ -80,7 +80,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, "Ljava/lang/InternalError", "LZ4_uncompress_unknownOutputSize failed."); + THROW(env, "java/lang/InternalError", "LZ4_uncompress_unknownOutputSize failed."); } (*env)->SetIntField(env, thisj, Lz4Decompressor_compressedDirectBufLen, 0); diff --git a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c index 65c978b2065..fe827f02dea 100644 --- a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c +++ b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c @@ -134,11 +134,11 @@ JNIEXPORT jint JNICALL Java_org_apache_hadoop_io_compress_snappy_SnappyCompresso ret = dlsym_snappy_compress(uncompressed_bytes, uncompressed_direct_buf_len, compressed_bytes, &buf_len); if (ret != SNAPPY_OK){ - THROW(env, "Ljava/lang/InternalError", "Could not compress data. Buffer length is too small."); + THROW(env, "java/lang/InternalError", "Could not compress data. Buffer length is too small."); return 0; } if (buf_len > JINT_MAX) { - THROW(env, "Ljava/lang/InternalError", "Invalid return buffer length."); + THROW(env, "java/lang/InternalError", "Invalid return buffer length."); return 0; } diff --git a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/snappy/SnappyDecompressor.c b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/snappy/SnappyDecompressor.c index 022f2b04591..d1fd13c9e54 100644 --- a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/snappy/SnappyDecompressor.c +++ b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/snappy/SnappyDecompressor.c @@ -126,11 +126,11 @@ JNIEXPORT jint JNICALL Java_org_apache_hadoop_io_compress_snappy_SnappyDecompres ret = dlsym_snappy_uncompress(compressed_bytes, compressed_direct_buf_len, uncompressed_bytes, &uncompressed_direct_buf_len); if (ret == SNAPPY_BUFFER_TOO_SMALL){ - THROW(env, "Ljava/lang/InternalError", "Could not decompress data. Buffer length is too small."); + THROW(env, "java/lang/InternalError", "Could not decompress data. Buffer length is too small."); } else if (ret == SNAPPY_INVALID_INPUT){ - THROW(env, "Ljava/lang/InternalError", "Could not decompress data. Input is invalid."); + THROW(env, "java/lang/InternalError", "Could not decompress data. Input is invalid."); } else if (ret != SNAPPY_OK){ - THROW(env, "Ljava/lang/InternalError", "Could not decompress data."); + THROW(env, "java/lang/InternalError", "Could not decompress data."); } (*env)->SetIntField(env, thisj, SnappyDecompressor_compressedDirectBufLen, 0);