Browse Source

HADOOP-9435. Support building the JNI code against the IBM JVM. (Tian Hong Wang via Colin Patrick McCabe)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2.1-beta@1511935 13f79535-47bb-0310-9956-ffa450edef68
Colin McCabe 12 năm trước cách đây
mục cha
commit
057d0ac8f3

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -11,6 +11,9 @@ Release 2.1.1-beta - UNRELEASED
     HADOOP-9787. ShutdownHelper util to shutdown threads and threadpools.
     (Karthik Kambatla via Sandy Ryza)
 
+    HADOOP-9435.  Support building the JNI code against the IBM JVM.
+    (Tian Hong Wang via Colin Patrick McCabe)
+
   OPTIMIZATIONS
 
   BUG FIXES

+ 2 - 1
hadoop-common-project/hadoop-common/src/JNIFlags.cmake

@@ -95,8 +95,9 @@ IF("${CMAKE_SYSTEM}" MATCHES "Linux")
         NAMES jni.h 
         PATHS ${_JDK_DIRS}
         NO_DEFAULT_PATH)
+    #In IBM java, it's jniport.h instead of jni_md.h
     FIND_PATH(JAVA_INCLUDE_PATH2 
-        NAMES jni_md.h
+        NAMES jni_md.h jniport.h
         PATHS ${_JDK_DIRS}
         NO_DEFAULT_PATH)
     SET(JNI_INCLUDE_DIRS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})

+ 2 - 0
hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt

@@ -91,6 +91,8 @@ add_dual_library(hdfs
 )
 target_link_dual_libraries(hdfs
     ${JAVA_JVM_LIBRARY}
+    dl
+    pthread
 )
 dual_output_directory(hdfs target/usr/local/lib)
 set(LIBHDFS_VERSION "0.0.0")