Skip to content

Commit

Permalink
Merge branch 'fix_hdfs_core' into 'master'
Browse files Browse the repository at this point in the history
fix potential core

See merge request oceanbase-ce-publish/ob-deps!16
  • Loading branch information
淮新 committed Dec 31, 2024
2 parents b50e164 + 793908a commit b805b14
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions patch/hdfs2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/jni_helper.c b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/jni_helper.c
index 1c833a7756..ecb4cf862d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/jni_helper.c
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/jni_helper.c
@@ -962,6 +962,8 @@ JNIEnv* getJNIEnv(void)
fail:
fprintf(stderr, "getJNIEnv: getGlobalJNIEnv failed\n");
hdfsThreadDestructor(state);
+ threadLocalStorageSet(NULL);
+ THREAD_LOCAL_STORAGE_SET_QUICK(NULL);
return NULL;
}

--
2.17.0
1 change: 1 addition & 0 deletions rpm/devdeps-hdfs-sdk.spec
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ tar xf %{_src}.tar.gz
cd %{_src_path}
git init
git apply --whitespace=fix ../patch/hdfs.patch
git apply --whitespace=fix ../patch/hdfs2.patch

mvn -pl :hadoop-hdfs-native-client -Pnative compile -Dnative_make_args="copy_hadoop_files"

Expand Down

0 comments on commit b805b14

Please sign in to comment.