Weixin-Xu commented on code in PR #13492:
URL: https://github.com/apache/gluten/pull/13492#discussion_r4421639549


##########
cpp/bolt/jni/BoltJniWrapper.cc:
##########
@@ -946,15 +946,14 @@ JNIEXPORT jlong JNICALL 
Java_org_apache_gluten_shuffle_BoltShuffleWriterJniWrapp
 
   std::shared_ptr<RssClient> rssClient = nullptr;
   if (partitionPusher != nullptr) {
-    jclass celebornPartitionPusherClass =
-        createGlobalClassReferenceOrError(env, 
"Lorg/apache/spark/shuffle/CelebornPartitionPusher;");
-    jmethodID celebornPushPartitionDataMethod =
-        getMethodIdOrError(env, celebornPartitionPusherClass, 
"pushPartitionData", "(I[BI)I");
+    jclass partitionPusherClass = env->GetObjectClass(partitionPusher);

Review Comment:
   Replaced the raw GetByteArrayElements call with 
gluten::getByteArrayElementsSafe. The scoped holder keeps the elements valid 
during protobuf parsing and releases them on both normal and exceptional exits.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to