diff --git a/bin/pulsar b/bin/pulsar index ce79cfbfa4459..17f2cd825cf74 100755 --- a/bin/pulsar +++ b/bin/pulsar @@ -44,7 +44,13 @@ FUNCTIONS_EXTRA_DEPS_DIR=${PULSAR_FUNCTIONS_EXTRA_DEPS_DIR:-"${DEFAULT_FUNCTIONS SQL_HOME=$PULSAR_HOME/pulsar-sql PRESTO_HOME=${PULSAR_HOME}/lib/presto +# Check bookkeeper env and load bkenv.sh +if [ -f "$PULSAR_HOME/conf/bkenv.sh" ] +then + . "$PULSAR_HOME/conf/bkenv.sh" +fi +# Check pulsar env and load pulser_env.sh if [ -f "$PULSAR_HOME/conf/pulsar_env.sh" ] then . "$PULSAR_HOME/conf/pulsar_env.sh" diff --git a/bin/pulsar-daemon b/bin/pulsar-daemon index 89c66a9cc6b51..9848c26d33158 100755 --- a/bin/pulsar-daemon +++ b/bin/pulsar-daemon @@ -40,6 +40,12 @@ EOF BINDIR=$(dirname "$0") PULSAR_HOME=$(cd $BINDIR/..;pwd) +# Check bookkeeper env and load bkenv.sh +if [ -f "$PULSAR_HOME/conf/bkenv.sh" ] +then + . "$PULSAR_HOME/conf/bkenv.sh" +fi + if [ -f "$PULSAR_HOME/conf/pulsar_env.sh" ] then . "$PULSAR_HOME/conf/pulsar_env.sh" diff --git a/bin/pulsar-perf b/bin/pulsar-perf index af2d010f6f055..83814e9fcaf19 100755 --- a/bin/pulsar-perf +++ b/bin/pulsar-perf @@ -24,6 +24,12 @@ PULSAR_HOME=`cd $BINDIR/..;pwd` DEFAULT_CLIENT_CONF=${PULSAR_CLIENT_CONF:-"$PULSAR_HOME/conf/client.conf"} DEFAULT_LOG_CONF=$PULSAR_HOME/conf/log4j2.yaml +# Check bookkeeper env and load bkenv.sh +if [ -f "$PULSAR_HOME/conf/bkenv.sh" ] +then + . "$PULSAR_HOME/conf/bkenv.sh" +fi + if [ -f "$PULSAR_HOME/conf/pulsar_env.sh" ] then . "$PULSAR_HOME/conf/pulsar_env.sh" diff --git a/conf/pulsar_env.sh b/conf/pulsar_env.sh index 7428d1d468398..98155f28560a9 100755 --- a/conf/pulsar_env.sh +++ b/conf/pulsar_env.sh @@ -59,7 +59,3 @@ PULSAR_EXTRA_OPTS=${PULSAR_EXTRA_OPTS:-" -Dpulsar.allocator.exit_on_oom=true -Di #Wait time before forcefully kill the pulser server instance, if the stop is not successful #PULSAR_STOP_TIMEOUT= -# Set BOOKIE_EXTRA_OPTS option here to ensure that all pulsar scripts can work seamless with bookkeeper - -# Extra options to be passed to the jvm -BOOKIE_EXTRA_OPTS="${BOOKIE_EXTRA_OPTS} -Dio.netty.leakDetectionLevel=disabled -Dio.netty.recycler.maxCapacity.default=1000 -Dio.netty.recycler.linkCapacity=1024" \ No newline at end of file diff --git a/src/pulsar-io-gen b/src/pulsar-io-gen index 05ace66b748ee..a3083e8f2b549 100755 --- a/src/pulsar-io-gen +++ b/src/pulsar-io-gen @@ -23,6 +23,12 @@ PULSAR_HOME=`cd $BINDIR/..;pwd` DEFAULT_LOG_CONF=$PULSAR_HOME/conf/log4j2.yaml +# Check bookkeeper env and load bkenv.sh +if [ -f "$PULSAR_HOME/conf/bkenv.sh" ] +then + . "$PULSAR_HOME/conf/bkenv.sh" +fi + if [ -f "$PULSAR_HOME/conf/pulsar_env.sh" ] then . "$PULSAR_HOME/conf/pulsar_env.sh"