You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/11/16 08:11:44 UTC

[GitHub] [pulsar] hangc0276 opened a new pull request #5675: fix bkenv has no effect bug when start bookie using bin/pulsar-daemon

hangc0276 opened a new pull request #5675: fix bkenv has no effect bug when start bookie using bin/pulsar-daemon
URL: https://github.com/apache/pulsar/pull/5675
 
 
   when i start bookie using `bin/pulsar-daemon start bookie` command, i found the bookie environment variable defined in conf/bkenv.sh has no effect, but using $PULSAR_MEM and $PULSAR_GC instead.
   
   Then i check the bin/pulsar shell script, i found as follow:
   ```
   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.proto.BookieServer --conf $PULSAR_BOOKKEEPER_CONF $@
   ```
   but in pulsar_env.sh, the `$BOOKIE_EXTRA_OPTS` defined as follow:
   ```
   # 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"
   ```
   `$BOOKIE_EXTRA_OPTS` do not define `$BOOKIE_MEM` and `$BOOKIE_GC`, then the pulsar script will using `$PULSAR_MEM` and `$PULSAR_GC` instead to start bookkeeper.
   
   So, i suggest to load conf/bkenv.sh in bin/pulsar script and using `$BOOKIE_EXTRA_OPTS` in conf/bkenv.sh instread of `$BOOKIE_EXTRA_OPTS` in bin/pulsar_env.sh

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services