Duplicate flags when running bin/pulsar bookie
See original GitHub issueDescribe the bug A recent change (https://github.com/apache/pulsar/pull/5675) was made to the the bin/pulsar script. This change loads the bkenv.sh file and then sets the opts when running the bookie. This produces duplicate flags when running a bookie.
/usr/bin/java -cp /Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/conf:::/Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/lib/: -Dlog4j.configurationFile=log4j2.yaml -Djute.maxbuffer=10485760 -Djava.net.preferIPv4Stack=true -Dpulsar.allocator.exit_on_oom=true -Dio.netty.recycler.maxCapacity.default=1000 -Dio.netty.recycler.linkCapacity=1024 -Xms2g -Xmx2g -XX:MaxDirectMemorySize=4g -XX:+UseG1GC -XX:MaxGCPauseMillis=10 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -Dpulsar.log.appender=RoutingAppender -Dpulsar.log.dir=/Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/logs -Dpulsar.log.level=info -Dpulsar.routing.appender.default=Console -Dpulsar.functions.process.container.log.dir=/Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/logs -Dpulsar.functions.java.instance.jar=/Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/instances/java-instance.jar -Dpulsar.functions.python.instance.file=/Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/instances/python-instance/python_instance_main.py -Dpulsar.functions.extra.dependencies.dir=/Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/instances/deps -Dpulsar.functions.instance.classpath=/Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/conf:::/Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/lib/: -Xms2g -Xmx2g -XX:MaxDirectMemorySize=2g -XX:+UseG1GC -XX:MaxGCPauseMillis=10 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -Dio.netty.leakDetectionLevel=disabled -Dio.netty.recycler.maxCapacity.default=1000 -Dio.netty.recycler.linkCapacity=1024 -Dpulsar.log.file=bookkeeper.log org.apache.bookkeeper.proto.BookieServer --conf /Users/ckellogg/apps/apache-pulsar-2.6.0-SNAPSHOT/conf/bookkeeper.conf
For example the Xms and XX:MaxDirectMemory are set twice. What is the behavior if flags are set twice? What value gets used?
To Reproduce Steps to reproduce the behavior:
- bin/pulsar bookie
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (14 by maintainers)
Top GitHub Comments
I think we need to resolve this issue there are still duplicate flags when starting a bookie by running
pulsar/bookie
. This is confusing to users and causing unexpected issues. I think this change (https://github.com/apache/pulsar/pull/5675) should be reverted before 2.6.https://stackoverflow.com/questions/2740725/duplicated-java-runtime-options-what-is-the-order-of-preference
Closed by https://github.com/apache/pulsar/pull/9469.