HDFS-14321. Fix -Xcheck:jni issues in libhdfs, run ctest with -Xcheck:jni enabled. Contributed by Sahil Takiar.
Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org>
This commit is contained in:
parent
10b802b84b
commit
cb0fa0ce3f
@ -243,6 +243,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||||||
<exec executable="ctest" failonerror="true" dir="${project.build.directory}/">
|
<exec executable="ctest" failonerror="true" dir="${project.build.directory}/">
|
||||||
<arg line="--output-on-failure"/>
|
<arg line="--output-on-failure"/>
|
||||||
<arg line="${native_ctest_args}"/>
|
<arg line="${native_ctest_args}"/>
|
||||||
|
<env key="LIBHDFS_OPTS" value="${env.LIBHDFS_OPTS} -Xcheck:jni"/>
|
||||||
<env key="CLASSPATH" value="${test_classpath}:${compile_classpath}"/>
|
<env key="CLASSPATH" value="${test_classpath}:${compile_classpath}"/>
|
||||||
<!-- Make sure libhadoop.so is on LD_LIBRARY_PATH. -->
|
<!-- Make sure libhadoop.so is on LD_LIBRARY_PATH. -->
|
||||||
<env key="LD_LIBRARY_PATH" value="${env.LD_LIBRARY_PATH}:${project.build.directory}/native/target/usr/local/lib:${hadoop.common.build.dir}/native/target/usr/local/lib"/>
|
<env key="LD_LIBRARY_PATH" value="${env.LD_LIBRARY_PATH}:${project.build.directory}/native/target/usr/local/lib:${hadoop.common.build.dir}/native/target/usr/local/lib"/>
|
||||||
|
@ -2508,7 +2508,7 @@ int hadoopRzOptionsSetByteBufferPool(
|
|||||||
// Delete any previous ByteBufferPool we had.
|
// Delete any previous ByteBufferPool we had.
|
||||||
(*env)->DeleteGlobalRef(env, opts->byteBufferPool);
|
(*env)->DeleteGlobalRef(env, opts->byteBufferPool);
|
||||||
}
|
}
|
||||||
opts->byteBufferPool = byteBufferPool;
|
opts->byteBufferPool = (*env)->NewGlobalRef(env, byteBufferPool);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user