Skip to content

Duplicate flags when running bin/pulsar bookie #5843

@cckellogg

Description

@cckellogg

Describe the bug
A recent change (#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:

  1. bin/pulsar bookie

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions