You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When first JNI call occurs, native side convert local ref to a global ref and hold it, then we can call JVM from native side and access origin Spark task's object we created before by this ref.
Simplify JNI layer complexity.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Current implementation has lots of checks for whether current thread is origin Spark task thread, and we still add compromises to avoid that check, such as
https://github.com/oap-project/gluten/blob/218f1776514d9aada7a582c6bfc23ce4cadfa4fc/gluten-core/src/main/scala/org/apache/spark/util/TaskResources.scala#L45-L46
https://github.com/oap-project/gluten/blob/6b93602cd26bc1e29fd8f11d60714d06ebc39d19/cpp/core/utils/TaskContext.cc#L58-L64
It bring much complexity and over design.
Describe the solution you'd like
When first JNI call occurs, native side convert local ref to a global ref and hold it, then we can call JVM from native side and access origin Spark task's object we created before by this ref.
Simplify JNI layer complexity.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: