You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/02/27 21:20:29 UTC

[GitHub] sijie closed pull request #1210: Issue 1147: Move bookkeeper-server/{bin,conf} to root module

sijie closed pull request #1210: Issue 1147: Move bookkeeper-server/{bin,conf} to root module
URL: https://github.com/apache/bookkeeper/pull/1210
 
 
   

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/bookkeeper-server/bin/bookkeeper b/bin/bookkeeper
similarity index 96%
rename from bookkeeper-server/bin/bookkeeper
rename to bin/bookkeeper
index fc40ed5b7..6b5bacda9 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 722fe5df0..31d9f6027 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 250e4eb46..fd45d673e 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 4187c3f1c..7bbd3b2cb 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 323009ff9..2f57061d1 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 464ff4aa0..60dace699 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 2eaeecebb..8900b3df4 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 a9d11d80c..3c4d0ded7 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 b0dd95f46..cee7364bc 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 c2f2e0e9d..caec94859 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


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services