You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by pe...@apache.org on 2021/02/18 15:57:00 UTC
[pulsar] 06/27: avoid duplicate extra opts (#9469)
This is an automated email from the ASF dual-hosted git repository.
penghui pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit c8e835788eff458d8e9670acddb0cf649de7364f
Author: Renkai Ge <ga...@gmail.com>
AuthorDate: Mon Feb 8 10:26:48 2021 +0800
avoid duplicate extra opts (#9469)
Fixed: https://github.com/apache/pulsar/issues/9433
(cherry picked from commit ff9923e759e101d5d6bd2ce040f5ebdbdb295062)
---
bin/pulsar | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/bin/pulsar b/bin/pulsar
index 28f2f9d..6088115 100755
--- a/bin/pulsar
+++ b/bin/pulsar
@@ -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"}
@@ -308,8 +313,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"}