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

This commit is contained in:
Colin Patrick Mccabe 2016-03-29 17:13:52 -07:00
parent fc055a3cbe
commit e3d15a2e23

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