sijie closed pull request #1705: [table service] improve the bookkeeper script 
to better detect whether table service is enabled or not
URL: https://github.com/apache/bookkeeper/pull/1705
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/bin/bookkeeper b/bin/bookkeeper
index 07e7db3ecd..38280a1d76 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 97404fb1bb..df6c9916ca 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)


 

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


With regards,
Apache Git Services

Reply via email to