[GLUTEN-9239][CH] [PART-1] Support Java-17 Rmove JNI_OnUnload#9275
[GLUTEN-9239][CH] [PART-1] Support Java-17 Rmove JNI_OnUnload#9275baibaichen merged 1 commit intoapache:mainfrom
JNI_OnUnload#9275Conversation
|
Run Gluten Clickhouse CI on x86 |
| JNIEXPORT void JNI_OnUnload(JavaVM * vm, void * /*reserved*/) | ||
| { | ||
| // manually destroy native in 'nativeDestroyNative' method | ||
| } |
There was a problem hiding this comment.
IIUC, in CH, the unloading actually does nothing?
Then why was the unloading code from Java side strictly required for CH backend in current code base? https://github.com/apache/incubator-gluten/blob/fdd83714067c4a77006d6695b2bd8f6ad9e3ef23/backends-clickhouse/src/main/scala/org/apache/gluten/backendsapi/clickhouse/CHListenerApi.scala#L84-L89
There was a problem hiding this comment.
No, we actually need unloading. We curently move to Java_org_apache_gluten_vectorized_ExpressionEvaluatorJniWrapper_nativeDestroyNative see #9242
The reason why we do this is openjdk/jdk17u-dev@75a8b7f doesn't allow unload jni for built-in classloader
There was a problem hiding this comment.
Great. I think we can remove the Java-side unloading API then? With some minor refactors.
ea929c6 to
f904805
Compare
|
Run Gluten Clickhouse CI on x86 |
f904805 to
567403a
Compare
|
Run Gluten Clickhouse CI on x86 |
|
run spark 35 backends-clickhouse with java-17 |


What changes were proposed in this pull request?
Remove
JNI_OnUnload, since it is no longer needed. using this PR to run gluten-dev ci for testing java-17(Fixes: #9239)
How was this patch tested?
Using existed UTs