You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by si...@apache.org on 2018/02/27 21:20:26 UTC

[bookkeeper] branch master updated: ISSUE #1147: Move bookkeeper-server/{bin, conf} to root module

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 d237b53  ISSUE #1147: Move bookkeeper-server/{bin,conf} to root module
d237b53 is described below

commit d237b537dc62b53d7ffc51860b98e5bd0a2ca9b8
Author: Sijie Guo <si...@apache.org>
AuthorDate: Tue Feb 27 13:20:19 2018 -0800

    ISSUE #1147: Move bookkeeper-server/{bin,conf} to root module
    
    Descriptions of the changes in this PR:
    
    *Motivation*
    
    since 4.7, we are shipping the binary distribution using bookkeeper-dist modules. so it is making more sense to have {bin,conf} directory at root module,
    rather than bookkeeper-server module.
    
    *Solution*
    
    - move bookkeeper-server/bin to bin
    - move bookkeeper-server/conf to conf
    - update the new bookkeeper cli related files as "experimental"
    
    This change is needed for integrating with dlog scripts for BP-26 and new bookkeeper cli for BP-27.
    
    Master Issue: #1147
    
    Related Issues:
    
    - BP-26 #1024
    - BP-27 #1000
    
    Author: Sijie Guo <si...@apache.org>
    
    Reviewers: Ivan Kelly <iv...@apache.org>
    
    This closes #1210 from sijie/move_bin_conf, closes #1147
---
 {bookkeeper-server/bin => bin}/bookkeeper               | 11 +++++------
 bin/bookkeeper-cli                                      |  8 +++-----
 {bookkeeper-server/bin => bin}/bookkeeper-cluster.sh    |  0
 {bookkeeper-server/bin => bin}/bookkeeper-daemon.sh     |  0
 bookkeeper-dist/src/assemble/bin-all.xml                |  4 ++--
 bookkeeper-dist/src/assemble/bin-server.xml             |  4 ++--
 conf/bk_cli_env.sh                                      |  4 ++--
 {bookkeeper-server/conf => conf}/bk_server.conf         |  2 --
 {bookkeeper-server/conf => conf}/bkenv.sh               | 16 +++++++---------
 {bookkeeper-server/conf => conf}/jaas_example.conf      |  0
 conf/log4j.cli.properties                               |  3 ++-
 {bookkeeper-server/conf => conf}/log4j.properties       |  4 ++++
 {bookkeeper-server/conf => conf}/log4j.shell.properties |  3 ++-
 13 files changed, 29 insertions(+), 30 deletions(-)

diff --git a/bookkeeper-server/bin/bookkeeper b/bin/bookkeeper
similarity index 96%
rename from bookkeeper-server/bin/bookkeeper
rename to bin/bookkeeper
index fc40ed5..6b5bacd 100755
--- a/bookkeeper-server/bin/bookkeeper
+++ b/bin/bookkeeper
@@ -1,8 +1,6 @@
 #!/usr/bin/env bash
 #
 #/**
-# * Copyright 2007 The Apache Software Foundation
-# *
 # * Licensed to the Apache Software Foundation (ASF) under one
 # * or more contributor license agreements.  See the NOTICE file
 # * distributed with this work for additional information
@@ -53,6 +51,7 @@ BK_HOME=`cd $BINDIR/..;pwd`
 
 DEFAULT_CONF=$BK_HOME/conf/bk_server.conf
 DEFAULT_LOG_CONF=$BK_HOME/conf/log4j.properties
+SERVER_HOME=${BK_HOME}/bookkeeper-server
 
 source $BK_HOME/conf/bkenv.sh
 
@@ -94,7 +93,7 @@ else
   fi
 fi
 
-BUILT_JAR=$(find-server-jar ${BK_HOME}/target)
+BUILT_JAR=$(find-server-jar ${SERVER_HOME}/target)
 
 if [ -z "${BUILT_JAR}" ] && [ -z "${BOOKIE_JAR}" ]; then
   echo "Couldn't find bookkeeper jar."
@@ -108,7 +107,7 @@ if [ -z "${BUILT_JAR}" ] && [ -z "${BOOKIE_JAR}" ]; then
       ;;
   esac
 
-  BUILT_JAR=$(find-server-jar ${BK_HOME}/target)
+  BUILT_JAR=$(find-server-jar ${SERVER_HOME}/target)
   if [ -n "${BUILT_JAR}" ]; then
     BOOKIE_JAR=$BUILT_JAR
   fi
@@ -158,10 +157,10 @@ add_maven_deps_to_classpath() {
   # Need to generate classpath from maven pom. This is costly so generate it
   # and cache it. Save the file into our target dir so a mvn clean will get
   # clean it up and force us create a new one.
-  f="${BK_HOME}/target/cached_classpath.txt"
+  f="${SERVER_HOME}/target/cached_classpath.txt"
   if [ ! -f "${f}" ]
   then
-    ${MVN} -f "${BK_HOME}/pom.xml" dependency:build-classpath -Dmdep.outputFile="${f}" &> /dev/null
+    ${MVN} -f "${SERVER_HOME}/pom.xml" dependency:build-classpath -Dmdep.outputFile="${f}" &> /dev/null
   fi
   BOOKIE_CLASSPATH=${CLASSPATH}:`cat "${f}"`
 }
diff --git a/bin/bookkeeper-cli b/bin/bookkeeper-cli
index 722fe5d..31d9f60 100755
--- a/bin/bookkeeper-cli
+++ b/bin/bookkeeper-cli
@@ -1,8 +1,6 @@
 #!/usr/bin/env bash
 #
 #/**
-# * Copyright 2007 The Apache Software Foundation
-# *
 # * Licensed to the Apache Software Foundation (ASF) under one
 # * or more contributor license agreements.  See the NOTICE file
 # * distributed with this work for additional information
@@ -20,12 +18,12 @@
 # * limitations under the License.
 # */
 
+# BookKeeper CLI (experimental)
+
 BINDIR=`dirname "$0"`
 BK_HOME=`cd $BINDIR/..;pwd`
 
-# TODO: change the default conf after moving conf to root module
-#       {@link https://github.com/apache/bookkeeper/issues/1147}
-DEFAULT_CONF=$BK_HOME/bookkeeper-server/conf/bk_server.conf
+DEFAULT_CONF=$BK_HOME/conf/bk_server.conf
 DEFAULT_LOG_CONF=$BK_HOME/conf/log4j.cli.properties
 TOOLS_HOME=${BK_HOME}/bookkeeper-tools
 
diff --git a/bookkeeper-server/bin/bookkeeper-cluster.sh b/bin/bookkeeper-cluster.sh
old mode 100644
new mode 100755
similarity index 100%
rename from bookkeeper-server/bin/bookkeeper-cluster.sh
rename to bin/bookkeeper-cluster.sh
diff --git a/bookkeeper-server/bin/bookkeeper-daemon.sh b/bin/bookkeeper-daemon.sh
similarity index 100%
rename from bookkeeper-server/bin/bookkeeper-daemon.sh
rename to bin/bookkeeper-daemon.sh
diff --git a/bookkeeper-dist/src/assemble/bin-all.xml b/bookkeeper-dist/src/assemble/bin-all.xml
index 250e4eb..fd45d67 100644
--- a/bookkeeper-dist/src/assemble/bin-all.xml
+++ b/bookkeeper-dist/src/assemble/bin-all.xml
@@ -31,11 +31,11 @@
       </includes>
     </fileSet>
     <fileSet>
-      <directory>../../bookkeeper-server/conf</directory>
+      <directory>../../conf</directory>
       <outputDirectory>/conf</outputDirectory>
     </fileSet>
     <fileSet>
-      <directory>../../bookkeeper-server/bin</directory>
+      <directory>../../bin</directory>
       <fileMode>755</fileMode>
       <outputDirectory>/bin</outputDirectory>
     </fileSet>
diff --git a/bookkeeper-dist/src/assemble/bin-server.xml b/bookkeeper-dist/src/assemble/bin-server.xml
index 4187c3f..7bbd3b2 100644
--- a/bookkeeper-dist/src/assemble/bin-server.xml
+++ b/bookkeeper-dist/src/assemble/bin-server.xml
@@ -31,11 +31,11 @@
       </includes>
     </fileSet>
     <fileSet>
-      <directory>../../bookkeeper-server/conf</directory>
+      <directory>../../conf</directory>
       <outputDirectory>/conf</outputDirectory>
     </fileSet>
     <fileSet>
-      <directory>../../bookkeeper-server/bin</directory>
+      <directory>../../bin</directory>
       <fileMode>755</fileMode>
       <outputDirectory>/bin</outputDirectory>
     </fileSet>
diff --git a/conf/bk_cli_env.sh b/conf/bk_cli_env.sh
index 323009f..2f57061 100644
--- a/conf/bk_cli_env.sh
+++ b/conf/bk_cli_env.sh
@@ -1,8 +1,6 @@
 #!/bin/sh
 #
 #/**
-# * Copyright 2007 The Apache Software Foundation
-# *
 # * Licensed to the Apache Software Foundation (ASF) under one
 # * or more contributor license agreements.  See the NOTICE file
 # * distributed with this work for additional information
@@ -20,6 +18,8 @@
 # * limitations under the License.
 # */
 
+# Environment Settings for BookKeeper CLI (experimental)
+
 # Set JAVA_HOME here to override the environment setting
 # JAVA_HOME=
 
diff --git a/bookkeeper-server/conf/bk_server.conf b/conf/bk_server.conf
similarity index 99%
rename from bookkeeper-server/conf/bk_server.conf
rename to conf/bk_server.conf
index 464ff4a..60dace6 100755
--- a/bookkeeper-server/conf/bk_server.conf
+++ b/conf/bk_server.conf
@@ -1,8 +1,6 @@
 #!/bin/sh
 #
 #/**
-# * Copyright 2007 The Apache Software Foundation
-# *
 # * Licensed to the Apache Software Foundation (ASF) under one
 # * or more contributor license agreements.  See the NOTICE file
 # * distributed with this work for additional information
diff --git a/bookkeeper-server/conf/bkenv.sh b/conf/bkenv.sh
similarity index 79%
rename from bookkeeper-server/conf/bkenv.sh
rename to conf/bkenv.sh
index 2eaeece..8900b3d 100644
--- a/bookkeeper-server/conf/bkenv.sh
+++ b/conf/bkenv.sh
@@ -1,8 +1,6 @@
 #!/bin/sh
 #
 #/**
-# * Copyright 2007 The Apache Software Foundation
-# *
 # * Licensed to the Apache Software Foundation (ASF) under one
 # * or more contributor license agreements.  See the NOTICE file
 # * distributed with this work for additional information
@@ -40,14 +38,14 @@
 # Add extra paths to the bookkeeper classpath
 # BOOKIE_EXTRA_CLASSPATH=
 
-#Folder where the Bookie server PID file should be stored
-#BOOKIE_PID_DIR=
+# Folder where the Bookie server PID file should be stored
+# BOOKIE_PID_DIR=
 
-#Wait time before forcefully kill the Bookie server instance, if the stop is not successful
-#BOOKIE_STOP_TIMEOUT=
+# Wait time before forcefully kill the Bookie server instance, if the stop is not successful
+# BOOKIE_STOP_TIMEOUT=
 
-#Entry formatter class to format entries.
-#ENTRY_FORMATTER_CLASS=
+# Entry formatter class to format entries.
+# ENTRY_FORMATTER_CLASS=
 
 # this default config dir should match the 'localBookiesConfigDirectory' config value in the conf file of LocalBookKeeper
-#LOCALBOOKIES_CONFIG_DIR=/tmp/localbookies-config
\ No newline at end of file
+# LOCALBOOKIES_CONFIG_DIR=/tmp/localbookies-config
diff --git a/bookkeeper-server/conf/jaas_example.conf b/conf/jaas_example.conf
similarity index 100%
rename from bookkeeper-server/conf/jaas_example.conf
rename to conf/jaas_example.conf
diff --git a/conf/log4j.cli.properties b/conf/log4j.cli.properties
index a9d11d8..3c4d0de 100644
--- a/conf/log4j.cli.properties
+++ b/conf/log4j.cli.properties
@@ -20,7 +20,8 @@
 #
 
 #
-# BookKeeper CLI configuration
+# BookKeeper CLI (experimental) log4j configuration (used by `bin/bookkeeper-cli.sh`)
+#
 
 # DEFAULT: console appender only
 # Define some default values that can be overridden by system properties
diff --git a/bookkeeper-server/conf/log4j.properties b/conf/log4j.properties
similarity index 98%
rename from bookkeeper-server/conf/log4j.properties
rename to conf/log4j.properties
index b0dd95f..cee7364 100644
--- a/bookkeeper-server/conf/log4j.properties
+++ b/conf/log4j.properties
@@ -19,6 +19,10 @@
 #
 #
 
+#
+# BookKeeper Daemon log4j configuration
+#
+
 # Format is "<default threshold> (, <appender>)+
 
 # DEFAULT: console appender only
diff --git a/bookkeeper-server/conf/log4j.shell.properties b/conf/log4j.shell.properties
similarity index 98%
rename from bookkeeper-server/conf/log4j.shell.properties
rename to conf/log4j.shell.properties
index c2f2e0e..caec948 100644
--- a/bookkeeper-server/conf/log4j.shell.properties
+++ b/conf/log4j.shell.properties
@@ -20,7 +20,8 @@
 #
 
 #
-# BookieShell configuration
+# BookieShell log4j configuration
+#
 
 # DEFAULT: console appender only
 # Define some default values that can be overridden by system properties

-- 
To stop receiving notification emails like this one, please contact
sijie@apache.org.