Skip to content

Commit

Permalink
avoid duplicate extra opts (apache#9469)
Browse files Browse the repository at this point in the history
  • Loading branch information
Renkai authored Feb 8, 2021
1 parent f6f4c15 commit ff9923e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bin/pulsar
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,12 @@ OPTS="$OPTS -Djute.maxbuffer=10485760 -Djava.net.preferIPv4Stack=true"

OPTS="-cp $PULSAR_CLASSPATH $OPTS"

OPTS="$OPTS $PULSAR_EXTRA_OPTS $PULSAR_MEM $PULSAR_GC"
if [ $COMMAND == "bookie" ]; then
# Pass BOOKIE_EXTRA_OPTS option defined in bkenv.sh
OPTS="$OPTS $BOOKIE_EXTRA_OPTS"
else
OPTS="$OPTS $PULSAR_EXTRA_OPTS $PULSAR_MEM $PULSAR_GC"
fi

# log directory & file
PULSAR_LOG_DIR=${PULSAR_LOG_DIR:-"$PULSAR_HOME/logs"}
Expand Down Expand Up @@ -310,8 +315,6 @@ if [ $COMMAND == "broker" ]; then
exec $JAVA $OPTS $ASPECTJ_AGENT -Dpulsar.log.file=$PULSAR_LOG_FILE org.apache.pulsar.PulsarBrokerStarter --broker-conf $PULSAR_BROKER_CONF $@
elif [ $COMMAND == "bookie" ]; then
PULSAR_LOG_FILE=${PULSAR_LOG_FILE:-"bookkeeper.log"}
# Pass BOOKIE_EXTRA_OPTS option defined in pulsar_env.sh
OPTS="$OPTS $BOOKIE_EXTRA_OPTS"
exec $JAVA $OPTS -Dpulsar.log.file=$PULSAR_LOG_FILE org.apache.bookkeeper.server.Main --conf $PULSAR_BOOKKEEPER_CONF $@
elif [ $COMMAND == "zookeeper" ]; then
PULSAR_LOG_FILE=${PULSAR_LOG_FILE:-"zookeeper.log"}
Expand Down

0 comments on commit ff9923e

Please sign in to comment.