This is an automated email from the ASF dual-hosted git repository. sijie pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push: new a04642b [TABLE SERVICE] improve the bookkeeper script to better detect whether table service is enabled or not a04642b is described below commit a04642bb2baede4fe6c2dbfe8eb89abf120f2f28 Author: Sijie Guo <guosi...@gmail.com> AuthorDate: Wed Sep 26 02:44:42 2018 -0700 [TABLE SERVICE] improve the bookkeeper script to better detect whether table service is enabled or not Descriptions of the changes in this PR: *motivation* Currently `bin/bookkeeper` automatically choose modules based on the command. However it would be much better to detect which module to use by checking the bookkeeper configuration settings. *changes* Improve `bin/bookkeeper` to better detect which module to use based on bookkeeper server configuration. Additionally adding dlog related settings in the server configuration file. Author: Sijie Guo <guosi...@gmail.com> Author: Qi Wang <42832902+codingwan...@users.noreply.github.com> Author: Charan Reddy Guttapalem <reddychara...@gmail.com> Author: Sijie Guo <si...@apache.org> Reviewers: Enrico Olivelli <eolive...@gmail.com>, Jia Zhai <None> This closes #1705 from sijie/improve_bookkeeper_scripts --- bin/bookkeeper | 24 +++++++++++++++++++----- conf/bk_server.conf | 7 +++++++ 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/bin/bookkeeper b/bin/bookkeeper index 07e7db3..38280a1 100755 --- a/bin/bookkeeper +++ b/bin/bookkeeper @@ -23,7 +23,25 @@ BK_HOME=`cd ${BINDIR}/..;pwd` source ${BK_HOME}/bin/common.sh -if [ "x$1" == "xstandalone" ]; then +# default variables +DEFAULT_CONF=${BK_HOME}/conf/bk_server.conf +DEFAULT_ZK_CONF=${BK_HOME}/conf/zookeeper.conf + +if [ -z "$BOOKIE_CONF" ]; then + BOOKIE_CONF_TO_CHECK=${DEFAULT_CONF} +else + BOOKIE_CONF_TO_CHECK=${BOOKIE_CONF} +fi + +# check the configuration to see if table service is enabled or not. +if [ -z "${ENABLE_TABLE_SERVICE}" ]; then + TABLE_SERVICE_SETTING=$(grep StreamStorageLifecycleComponent ${BOOKIE_CONF_TO_CHECK}) + if [ "${TABLE_SERVICE_SETTING}" != \#* ]; then + ENABLE_TABLE_SERVICE="true" + fi +fi + +if [ \( "x$1" == "xstandalone" \) -o \( "x${ENABLE_TABLE_SERVICE}" != "x" \) ]; then BOOKIE_MODULE_PATH=stream/server BOOKIE_MODULE_NAME="(org.apache.bookkeeper-)?stream-storage-server" else @@ -37,10 +55,6 @@ BOOKIE_JAR=$(find_module_jar ${BOOKIE_MODULE_PATH} ${BOOKIE_MODULE_NAME}) # set up the classpath BOOKIE_CLASSPATH=$(set_module_classpath ${BOOKIE_MODULE_PATH}) -# default variables -DEFAULT_CONF=${BK_HOME}/conf/bk_server.conf -DEFAULT_ZK_CONF=${BK_HOME}/conf/zookeeper.conf - bookkeeper_help() { cat <<EOF Usage: bookkeeper <command> diff --git a/conf/bk_server.conf b/conf/bk_server.conf index 97404fb..df6c991 100755 --- a/conf/bk_server.conf +++ b/conf/bk_server.conf @@ -939,6 +939,13 @@ zkEnableSecurity=false # the grpc server port to listen on. default is 4181 storageserver.grpc.port=4181 +### Dlog Settings for table service ### + +#### Replication Settings +dlog.bkcEnsembleSize=3 +dlog.bkcWriteQuorumSize=2 +dlog.bkcAckQuorumSize=2 + ### Storage ### # local storage directories for storing table ranges data (e.g. rocksdb sst files)