hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jl...@apache.org
Subject hadoop git commit: HADOOP-15859. ZStandardDecompressor.c mistakes a class for an instance. Contributed by Jason Lowe
Date Wed, 17 Oct 2018 19:46:46 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 e212d7d81 -> e412d8f6c


HADOOP-15859. ZStandardDecompressor.c mistakes a class for an instance. Contributed by Jason
Lowe

(cherry picked from commit 9abda83947a5babfe5a650b3409ad952f6782105)


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

Branch: refs/heads/branch-2
Commit: e412d8f6cd8ac4677fd8d5d6ebbb38f628a3854f
Parents: e212d7d8
Author: Jason Lowe <jlowe@apache.org>
Authored: Wed Oct 17 14:38:42 2018 -0500
Committer: Jason Lowe <jlowe@apache.org>
Committed: Wed Oct 17 14:45:56 2018 -0500

----------------------------------------------------------------------
 .../hadoop/io/compress/zstd/ZStandardCompressor.java     |  2 +-
 .../apache/hadoop/io/compress/zstd/ZStandardCompressor.c | 10 +++++-----
 .../hadoop/io/compress/zstd/ZStandardDecompressor.c      | 11 +++++------
 3 files changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/e412d8f6/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.java
index eb2121a..7445502 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.java
@@ -298,7 +298,7 @@ public class ZStandardCompressor implements Compressor {
   private native static void init(int level, long stream);
   private native int deflateBytesDirect(ByteBuffer src, int srcOffset,
       int srcLen, ByteBuffer dst, int dstLen);
-  private static native int getStreamSize();
+  private native static int getStreamSize();
   private native static void end(long strm);
   private native static void initIDs();
   public native static String getLibraryName();

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e412d8f6/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.c
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.c
b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.c
index 04f2a3e..055683a 100644
--- a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.c
+++ b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/zstd/ZStandardCompressor.c
@@ -139,7 +139,7 @@ JNIEXPORT void JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardCompress
 }
 
 // Create the compression stream
-JNIEXPORT jlong JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardCompressor_create
(JNIEnv *env, jobject this) {
+JNIEXPORT jlong JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardCompressor_create
(JNIEnv *env, jclass clazz) {
     ZSTD_CStream* const stream =  dlsym_ZSTD_createCStream();
     if (stream == NULL) {
         THROW(env, "java/lang/InternalError", "Error creating the stream");
@@ -149,7 +149,7 @@ JNIEXPORT jlong JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardCompres
 }
 
 // Initialize the compression stream
-JNIEXPORT void JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardCompressor_init (JNIEnv
*env, jobject this, jint level, jlong stream) {
+JNIEXPORT void JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardCompressor_init (JNIEnv
*env, jclass clazz, jint level, jlong stream) {
     size_t result = dlsym_ZSTD_initCStream((ZSTD_CStream *) stream, level);
     if (dlsym_ZSTD_isError(result)) {
         THROW(env, "java/lang/InternalError", dlsym_ZSTD_getErrorName(result));
@@ -158,7 +158,7 @@ JNIEXPORT void JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardCompress
 }
 
 // free the compression stream
-JNIEXPORT void JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardCompressor_end (JNIEnv
*env, jobject this, jlong stream) {
+JNIEXPORT void JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardCompressor_end (JNIEnv
*env, jclass clazz, jlong stream) {
     size_t result = dlsym_ZSTD_freeCStream((ZSTD_CStream *) stream);
     if (dlsym_ZSTD_isError(result)) {
         THROW(env, "java/lang/InternalError", dlsym_ZSTD_getErrorName(result));
@@ -227,7 +227,7 @@ JNIEXPORT jint Java_org_apache_hadoop_io_compress_zstd_ZStandardCompressor_defla
 }
 
 JNIEXPORT jstring JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardCompressor_getLibraryName
-(JNIEnv *env, jclass class) {
+(JNIEnv *env, jclass clazz) {
 #ifdef UNIX
     if (dlsym_ZSTD_isError) {
         Dl_info dl_info;
@@ -250,7 +250,7 @@ JNIEXPORT jstring JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardCompr
 
 // returns the max size of the recommended input and output buffers
 JNIEXPORT jint JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardCompressor_getStreamSize
-(JNIEnv *env, jobject this) {
+(JNIEnv *env, jclass clazz) {
     int x = (int) dlsym_ZSTD_CStreamInSize();
     int y = (int) dlsym_ZSTD_CStreamOutSize();
     return (x >= y) ? x : y;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e412d8f6/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/zstd/ZStandardDecompressor.c
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/zstd/ZStandardDecompressor.c
b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/zstd/ZStandardDecompressor.c
index e75a6ef..b97dd17 100644
--- a/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/zstd/ZStandardDecompressor.c
+++ b/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/zstd/ZStandardDecompressor.c
@@ -130,7 +130,7 @@ JNIEXPORT void JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardDecompre
     ZStandardDecompressor_remaining = (*env)->GetFieldID(env, clazz, "remaining", "I");
 }
 
-JNIEXPORT jlong JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardDecompressor_create(JNIEnv
*env, jobject this) {
+JNIEXPORT jlong JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardDecompressor_create(JNIEnv
*env, jclass clazz) {
     ZSTD_DStream * stream = dlsym_ZSTD_createDStream();
     if (stream == NULL) {
         THROW(env, "java/lang/InternalError", "Error creating stream");
@@ -139,17 +139,16 @@ JNIEXPORT jlong JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardDecompr
     return (jlong) stream;
 }
 
-JNIEXPORT void JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardDecompressor_init(JNIEnv
*env, jobject this, jlong stream) {
+JNIEXPORT void JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardDecompressor_init(JNIEnv
*env, jclass clazz, jlong stream) {
     size_t result = dlsym_ZSTD_initDStream((ZSTD_DStream *) stream);
     if (dlsym_ZSTD_isError(result)) {
         THROW(env, "java/lang/InternalError", dlsym_ZSTD_getErrorName(result));
         return;
     }
-    (*env)->SetIntField(env, this, ZStandardDecompressor_remaining, 0);
 }
 
 
-JNIEXPORT void JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardDecompressor_free(JNIEnv
*env, jclass obj, jlong stream) {
+JNIEXPORT void JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardDecompressor_free(JNIEnv
*env, jclass clazz, jlong stream) {
     size_t result = dlsym_ZSTD_freeDStream((ZSTD_DStream *) stream);
     if (dlsym_ZSTD_isError(result)) {
         THROW(env, "java/lang/InternalError", dlsym_ZSTD_getErrorName(result));
@@ -209,10 +208,10 @@ JNIEXPORT jint JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardDecompre
 
 // returns the max size of the recommended input and output buffers
 JNIEXPORT jint JNICALL Java_org_apache_hadoop_io_compress_zstd_ZStandardDecompressor_getStreamSize
-(JNIEnv *env, jclass obj) {
+(JNIEnv *env, jclass clazz) {
     int x = (int) dlsym_ZSTD_DStreamInSize();
     int y = (int) dlsym_ZSTD_DStreamOutSize();
     return (x >= y) ? x : y;
 }
 
-#endif //define HADOOP_ZSTD_LIBRARY
\ No newline at end of file
+#endif //define HADOOP_ZSTD_LIBRARY


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message