HADOOP-12972. Lz4Compressor#getLibraryName returns the wrong version number (cmccabe)

(cherry picked from commit e3d15a2e23)
(cherry picked from commit 9df2e54160)
This commit is contained in:
Colin Patrick Mccabe 2016-03-29 17:13:52 -07:00
parent bfe657e83a
commit 28c81640d3
1 changed files with 3 additions and 1 deletions

View File

@ -87,7 +87,9 @@ JNIEXPORT jstring JNICALL
Java_org_apache_hadoop_io_compress_lz4_Lz4Compressor_getLibraryName(
JNIEnv *env, jclass class
) {
return (*env)->NewStringUTF(env, "revision:99");
char version_buf[128];
snprintf(version_buf, sizeof(version_buf), "revision:%d", LZ4_versionNumber());
return (*env)->NewStringUTF(env, version_buf);
}
JNIEXPORT jint JNICALL Java_org_apache_hadoop_io_compress_lz4_Lz4Compressor_compressBytesDirectHC