Skip to content

Commit 5a2de5b

Browse files
committed
[SPARK-53851] Set io.netty.noUnsafe to true to avoid JEP-498 warnings
### What changes were proposed in this pull request? This PR aims to set `io.netty.noUnsafe` to `true` to avoid JEP-498 warnings. ### Why are the changes needed? Java 24 has started to print warnings when `sub.misc.Unsafe` is used to access memory. - https://openjdk.org/jeps/498 Since Netty 4.1.120.Final, we can use `io.netty.noUnsafe` setting. - netty/netty#14943 ### Does this PR introduce _any_ user-facing change? No behavior change. ### How was this patch tested? Manually tests. **BEFORE** ``` Starting Operator... WARNING: A terminally deprecated method in sun.misc.Unsafe has been called WARNING: sun.misc.Unsafe::allocateMemory has been called by io.netty.util.internal.PlatformDependent0$2 (file:/opt/spark-operator/operator/spark-kubernetes-operator.jar) WARNING: Please consider reporting this to the maintainers of class io.netty.util.internal.PlatformDependent0$2 WARNING: sun.misc.Unsafe::allocateMemory will be removed in a future release 25/10/09 03:35:46 INFO o.a.s.k.o.SparkOperator Configuring operator with 50 reconciliation threads. ``` **AFTER** ``` Starting Operator... 25/10/09 03:32:21 INFO o.a.s.k.o.SparkOperator Configuring operator with 50 reconciliation threads. ``` ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#378 from dongjoon-hyun/SPARK-53851. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent aad9ca1 commit 5a2de5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build-tools/helm/spark-kubernetes-operator/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ operatorDeployment:
4141
# https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/
4242
topologySpreadConstraints: [ ]
4343
operatorContainer:
44-
jvmArgs: "-Dfile.encoding=UTF8 -XX:+ExitOnOutOfMemoryError -XX:+UseParallelGC -XX:InitialRAMPercentage=80 -XX:MaxRAMPercentage=80"
44+
jvmArgs: "-Dfile.encoding=UTF8 -XX:+ExitOnOutOfMemoryError -XX:+UseParallelGC -XX:InitialRAMPercentage=80 -XX:MaxRAMPercentage=80 -Dio.netty.noUnsafe=true"
4545
env:
4646
- name: "SPARK_USER"
4747
value: "spark"

0 commit comments

Comments
 (0)