Skip to content

Conversation

@sarvekshayr
Copy link
Contributor

@sarvekshayr sarvekshayr commented Jul 29, 2024

What changes were proposed in this pull request?

HDDS-10382 introduced Java-version specific logic for Netty, we will move the setting of NETTY_OPTS to the ozone_java_setup function in hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh.
This will centralize the configuration and ensure compatibility with the existing RATIS_OPTS settings.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-11236

How was this patch tested?

Tested the patch locally on a docker cluster.

recon-1     | DEBUG: Final OZONE_OPTS: -Djava.net.preferIPv4Stack=true  -Dorg.apache.ratis.thirdparty.io.netty.allocator.useCacheForAllThreads=false -Dorg.apache.ratis.thirdparty.io.netty.tryReflectionSetAccessible=true   --add-opens java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED --add-exports java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED -XX:ParallelGCThreads=8 -Dhadoop.log.dir=/var/log/hadoop -Dhadoop.log.file=ozone.log -Dhadoop.home.dir=/opt/hadoop -Dhadoop.id.str=hadoop -Dhadoop.root.logger=INFO,console -Dhadoop.policy.file=hadoop-policy.xml -Dhadoop.security.logger=INFO,NullAppender
scm-1       | DEBUG: Final OZONE_OPTS: -Djava.net.preferIPv4Stack=true -Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dorg.apache.ratis.thirdparty.io.netty.allocator.useCacheForAllThreads=false -Dorg.apache.ratis.thirdparty.io.netty.tryReflectionSetAccessible=true   -Dlog4j.configurationFile=/etc/hadoop/scm-audit-log4j2.properties  --add-opens java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED --add-exports java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED -XX:ParallelGCThreads=8 -Dhadoop.log.dir=/var/log/hadoop -Dhadoop.log.file=ozone.log -Dhadoop.home.dir=/opt/hadoop -Dhadoop.id.str=hadoop -Dhadoop.root.logger=INFO,console -Dhadoop.policy.file=hadoop-policy.xml -Dhadoop.security.logger=INFO,NullAppender

Copy link
Contributor

@tanvipenumudy tanvipenumudy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch, @sarvekshayr. Overall, the changes look good.

@tanvipenumudy tanvipenumudy requested a review from adoroszlai July 29, 2024 10:37
Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sarvekshayr for the patch.

FYI, setting OZONE_SHELL_SCRIPT_DEBUG=true will make Ozone print OZONE_OPTS (among other debug messages), which is useful for testing:

ozone-datanode-1 | DEBUG: Final OZONE_OPTS: -Djava.net.preferIPv4Stack=true -Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlog4j.configurationFile=/etc/hadoop/dn-audit-log4j2.properties,/etc/hadoop/dn-container-log4j2.properties -Dorg.apache.ratis.thirdparty.io.netty.allocator.useCacheForAllThreads=false -Dorg.apache.ratis.thirdparty.io.netty.tryReflectionSetAccessible=true    --add-opens java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED --add-exports java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED -XX:ParallelGCThreads=8 -Dhadoop.log.dir=/var/log/hadoop -Dhadoop.log.file=ozone.log -Dhadoop.home.dir=/opt/hadoop -Dhadoop.id.str=hadoop -Dhadoop.root.logger=INFO,console -Dhadoop.policy.file=hadoop-policy.xml -Dhadoop.security.logger=INFO,NullAppender

@adoroszlai adoroszlai merged commit 57bfa8c into apache:master Jul 30, 2024
@adoroszlai
Copy link
Contributor

Thanks @sarvekshayr for the patch, @tanvipenumudy for the review.

devabhishekpal pushed a commit to devabhishekpal/ozone that referenced this pull request Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants