|
|
|
@ -1,8 +1,8 @@
|
|
|
|
|
diff --git a/hadoop-common-project/hadoop-common/src/CMakeLists.txt b/hadoop-common-project/hadoop-common/src/CMakeLists.txt
|
|
|
|
|
index dec63c4..de21bab 100644
|
|
|
|
|
index 942b19c..951191d 100644
|
|
|
|
|
--- a/hadoop-common-project/hadoop-common/src/CMakeLists.txt
|
|
|
|
|
+++ b/hadoop-common-project/hadoop-common/src/CMakeLists.txt
|
|
|
|
|
@@ -205,7 +205,6 @@ ENDIF()
|
|
|
|
|
@@ -277,7 +277,6 @@ ENDIF()
|
|
|
|
|
|
|
|
|
|
target_link_dual_libraries(hadoop
|
|
|
|
|
${LIB_DL}
|
|
|
|
@ -11,7 +11,7 @@ index dec63c4..de21bab 100644
|
|
|
|
|
SET(LIBHADOOP_VERSION "1.0.0")
|
|
|
|
|
SET_TARGET_PROPERTIES(hadoop PROPERTIES
|
|
|
|
|
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt
|
|
|
|
|
index 82d1a32..2151bb8 100644
|
|
|
|
|
index de885db..64492d2 100644
|
|
|
|
|
--- a/hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt
|
|
|
|
|
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt
|
|
|
|
|
@@ -147,7 +147,6 @@ if (NEED_LINK_DL)
|
|
|
|
@ -22,11 +22,53 @@ index 82d1a32..2151bb8 100644
|
|
|
|
|
${LIB_DL}
|
|
|
|
|
${OS_LINK_LIBRARIES}
|
|
|
|
|
)
|
|
|
|
|
@@ -162,7 +161,6 @@ add_executable(test_libhdfs_ops
|
|
|
|
|
)
|
|
|
|
|
target_link_libraries(test_libhdfs_ops
|
|
|
|
|
hdfs_static
|
|
|
|
|
- ${JAVA_JVM_LIBRARY}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
add_executable(test_libhdfs_read
|
|
|
|
|
@@ -170,7 +168,6 @@ add_executable(test_libhdfs_read
|
|
|
|
|
)
|
|
|
|
|
target_link_libraries(test_libhdfs_read
|
|
|
|
|
hdfs_static
|
|
|
|
|
- ${JAVA_JVM_LIBRARY}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
add_executable(test_libhdfs_write
|
|
|
|
|
@@ -178,7 +175,6 @@ add_executable(test_libhdfs_write
|
|
|
|
|
)
|
|
|
|
|
target_link_libraries(test_libhdfs_write
|
|
|
|
|
hdfs_static
|
|
|
|
|
- ${JAVA_JVM_LIBRARY}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
add_library(native_mini_dfs
|
|
|
|
|
@@ -190,17 +186,9 @@ add_library(native_mini_dfs
|
|
|
|
|
${OS_DIR}/thread_local_storage.c
|
|
|
|
|
)
|
|
|
|
|
target_link_libraries(native_mini_dfs
|
|
|
|
|
- ${JAVA_JVM_LIBRARY}
|
|
|
|
|
${OS_LINK_LIBRARIES}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
-add_executable(test_native_mini_dfs
|
|
|
|
|
- main/native/libhdfs/test_native_mini_dfs.c
|
|
|
|
|
-)
|
|
|
|
|
-target_link_libraries(test_native_mini_dfs
|
|
|
|
|
- native_mini_dfs
|
|
|
|
|
-)
|
|
|
|
|
-
|
|
|
|
|
add_executable(test_libhdfs_threaded
|
|
|
|
|
main/native/libhdfs/expect.c
|
|
|
|
|
main/native/libhdfs/test_libhdfs_threaded.c
|
|
|
|
|
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/native/fuse-dfs/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs/src/main/native/fuse-dfs/CMakeLists.txt
|
|
|
|
|
index dd3f1e6..68ba422 100644
|
|
|
|
|
index 8a8ea5b..5777737 100644
|
|
|
|
|
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/native/fuse-dfs/CMakeLists.txt
|
|
|
|
|
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/native/fuse-dfs/CMakeLists.txt
|
|
|
|
|
@@ -68,7 +68,6 @@ IF(FUSE_FOUND)
|
|
|
|
|
@@ -72,22 +72,11 @@ IF(FUSE_FOUND)
|
|
|
|
|
)
|
|
|
|
|
target_link_libraries(fuse_dfs
|
|
|
|
|
${FUSE_LIBRARIES}
|
|
|
|
@ -34,8 +76,6 @@ index dd3f1e6..68ba422 100644
|
|
|
|
|
hdfs
|
|
|
|
|
m
|
|
|
|
|
pthread
|
|
|
|
|
@@ -77,16 +77,6 @@ IF(FUSE_FOUND)
|
|
|
|
|
pthread
|
|
|
|
|
rt
|
|
|
|
|
)
|
|
|
|
|
- add_executable(test_fuse_dfs
|
|
|
|
@ -52,7 +92,7 @@ index dd3f1e6..68ba422 100644
|
|
|
|
|
IF(REQUIRE_FUSE)
|
|
|
|
|
MESSAGE(FATAL_ERROR "Required component fuse_dfs could not be built.")
|
|
|
|
|
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/jni_helper.c b/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/jni_helper.c
|
|
|
|
|
index 878289f..62686b3 100644
|
|
|
|
|
index 50d9681..c1d1f7b 100644
|
|
|
|
|
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/jni_helper.c
|
|
|
|
|
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/jni_helper.c
|
|
|
|
|
@@ -24,6 +24,7 @@
|
|
|
|
@ -76,7 +116,7 @@ index 878289f..62686b3 100644
|
|
|
|
|
char *hadoopClassPath;
|
|
|
|
|
const char *hadoopClassPathVMArg = "-Djava.class.path=";
|
|
|
|
|
size_t optHadoopClassPathLen;
|
|
|
|
|
@@ -384,10 +391,75 @@ static JNIEnv* getGlobalJNIEnv(void)
|
|
|
|
|
@@ -384,10 +391,77 @@ static JNIEnv* getGlobalJNIEnv(void)
|
|
|
|
|
JavaVMInitArgs vm_args;
|
|
|
|
|
JavaVM *vm;
|
|
|
|
|
JavaVMOption *options;
|
|
|
|
@ -110,6 +150,8 @@ index 878289f..62686b3 100644
|
|
|
|
|
+ const char *arch="arm";
|
|
|
|
|
+#elif defined(__aarch64__)
|
|
|
|
|
+ const char *arch="aarch64";
|
|
|
|
|
+#elif defined(__riscv) && __riscv_xlen == 64
|
|
|
|
|
+ const char *arch="riscv64";
|
|
|
|
|
+#elif defined(__sparc__) && defined(__arch64__)
|
|
|
|
|
+ const char *arch="sparcv9";
|
|
|
|
|
+#elif defined(__sparc__)
|
|
|
|
@ -153,7 +195,7 @@ index 878289f..62686b3 100644
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -396,6 +468,7 @@ static JNIEnv* getGlobalJNIEnv(void)
|
|
|
|
|
@@ -396,6 +470,7 @@ static JNIEnv* getGlobalJNIEnv(void)
|
|
|
|
|
hadoopClassPath = getenv("CLASSPATH");
|
|
|
|
|
if (hadoopClassPath == NULL) {
|
|
|
|
|
fprintf(stderr, "Environment variable CLASSPATH not set!\n");
|
|
|
|
@ -161,7 +203,7 @@ index 878289f..62686b3 100644
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
optHadoopClassPathLen = strlen(hadoopClassPath) +
|
|
|
|
|
@@ -502,7 +576,15 @@ static JNIEnv* getGlobalJNIEnv(void)
|
|
|
|
|
@@ -443,7 +518,15 @@ static JNIEnv* getGlobalJNIEnv(void)
|
|
|
|
|
vm_args.nOptions = noArgs;
|
|
|
|
|
vm_args.ignoreUnrecognized = 1;
|
|
|
|
|
|
|
|
|
@ -178,7 +220,7 @@ index 878289f..62686b3 100644
|
|
|
|
|
|
|
|
|
|
if (hadoopJvmArgs != NULL) {
|
|
|
|
|
free(hadoopJvmArgs);
|
|
|
|
|
@@ -512,6 +594,7 @@ static JNIEnv* getGlobalJNIEnv(void)
|
|
|
|
|
@@ -454,6 +537,7 @@ static JNIEnv* getGlobalJNIEnv(void)
|
|
|
|
|
if (rv != 0) {
|
|
|
|
|
fprintf(stderr, "Call to JNI_CreateJavaVM failed "
|
|
|
|
|
"with error: %d\n", rv);
|
|
|
|
@ -186,7 +228,7 @@ index 878289f..62686b3 100644
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
jthr = invokeMethod(env, NULL, STATIC, NULL,
|
|
|
|
|
@@ -470,6 +552,7 @@ static JNIEnv* getGlobalJNIEnv(void)
|
|
|
|
|
@@ -470,6 +554,7 @@ static JNIEnv* getGlobalJNIEnv(void)
|
|
|
|
|
if (rv != 0) {
|
|
|
|
|
fprintf(stderr, "Call to AttachCurrentThread "
|
|
|
|
|
"failed with error: %d\n", rv);
|
|
|
|
@ -194,49 +236,3 @@ index 878289f..62686b3 100644
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt
|
|
|
|
|
index 74f20dd..255d4ab 100644
|
|
|
|
|
--- a/hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt
|
|
|
|
|
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt
|
|
|
|
|
@@ -161,7 +161,6 @@ add_executable(test_libhdfs_ops
|
|
|
|
|
)
|
|
|
|
|
target_link_libraries(test_libhdfs_ops
|
|
|
|
|
hdfs_static
|
|
|
|
|
- ${JAVA_JVM_LIBRARY}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
add_executable(test_libhdfs_read
|
|
|
|
|
@@ -169,7 +168,6 @@ add_executable(test_libhdfs_read
|
|
|
|
|
)
|
|
|
|
|
target_link_libraries(test_libhdfs_read
|
|
|
|
|
hdfs_static
|
|
|
|
|
- ${JAVA_JVM_LIBRARY}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
add_executable(test_libhdfs_write
|
|
|
|
|
@@ -177,7 +175,6 @@ add_executable(test_libhdfs_write
|
|
|
|
|
)
|
|
|
|
|
target_link_libraries(test_libhdfs_write
|
|
|
|
|
hdfs_static
|
|
|
|
|
- ${JAVA_JVM_LIBRARY}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
add_library(native_mini_dfs
|
|
|
|
|
@@ -189,17 +186,9 @@ add_library(native_mini_dfs
|
|
|
|
|
${OS_DIR}/thread_local_storage.c
|
|
|
|
|
)
|
|
|
|
|
target_link_libraries(native_mini_dfs
|
|
|
|
|
- ${JAVA_JVM_LIBRARY}
|
|
|
|
|
${OS_LINK_LIBRARIES}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
-add_executable(test_native_mini_dfs
|
|
|
|
|
- main/native/libhdfs/test_native_mini_dfs.c
|
|
|
|
|
-)
|
|
|
|
|
-target_link_libraries(test_native_mini_dfs
|
|
|
|
|
- native_mini_dfs
|
|
|
|
|
-)
|
|
|
|
|
-
|
|
|
|
|
add_executable(test_libhdfs_threaded
|
|
|
|
|
main/native/libhdfs/expect.c
|
|
|
|
|
main/native/libhdfs/test_libhdfs_threaded.c
|
|
|
|
|