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/10/19 00:33:35 UTC
[bookkeeper] branch master updated: [BUILD] Fix build & bash script
error when not using `stream` profile
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 7016d0a [BUILD] Fix build & bash script error when not using `stream` profile
7016d0a is described below
commit 7016d0af6850ae565cc674a6d286782bbb5ba33a
Author: Sijie Guo <gu...@gmail.com>
AuthorDate: Fri Oct 19 08:33:30 2018 +0800
[BUILD] Fix build & bash script error when not using `stream` profile
Descriptions of the changes in this PR:
*Motivation*
There are two issues in current master when building without stream
- build `bkperf` failed
- bin/bookkeeper is using the wrong module
*Changes*
- build `bkperf` module as part of `stream` profile
- fix the problem in `bin/bookkeeper` locating the right module
- add two tests in travis to test builds without `stream` profile
Author: Sijie Guo <gu...@gmail.com>
Author: Sijie Guo <si...@apache.org>
Author: Charan Reddy Guttapalem <re...@gmail.com>
Author: Andrey Yegorov <dl...@users.noreply.github.com>
Author: Samuel Just <sj...@salesforce.com>
Reviewers: Enrico Olivelli <eo...@gmail.com>, Charan Reddy Guttapalem <re...@gmail.com>
This closes #1749 from sijie/fix_build_without_stream_profile
---
.travis.yml | 8 ++++++++
.travis_scripts/build.sh | 30 ++++++++++++++++++------------
bin/bookkeeper | 6 ++++--
pom.xml | 8 ++++----
tools/pom.xml | 2 +-
5 files changed, 35 insertions(+), 19 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 7c9b257..ad53fd5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -39,6 +39,14 @@ matrix:
env: CUSTOM_JDK="oraclejdk10"
- os: linux
env: CUSTOM_JDK="oraclejdk11"
+ - os: osx
+ osx_image: xcode8
+ env:
+ - STREAM_DISABLED="true"
+ - os: linux
+ env:
+ - CUSTOM_JDK="oraclejdk8"
+ - STREAM_DISABLED="true"
before_install:
- |
diff --git a/.travis_scripts/build.sh b/.travis_scripts/build.sh
index f751bd8..49e33a9 100755
--- a/.travis_scripts/build.sh
+++ b/.travis_scripts/build.sh
@@ -22,16 +22,22 @@ set -ev
BINDIR=`dirname "$0"`
BK_HOME=`cd $BINDIR/..;pwd`
-mvn --batch-mode clean apache-rat:check compile spotbugs:check install -DskipTests -Dstream
-$BK_HOME/dev/check-binary-license ./bookkeeper-dist/all/target/bookkeeper-all-*-bin.tar.gz;
-$BK_HOME/dev/check-binary-license ./bookkeeper-dist/server/target/bookkeeper-server-*-bin.tar.gz;
-if [ "$DLOG_MODIFIED" == "true" ]; then
- cd $BK_HOME/stream/distributedlog
- mvn --batch-mode clean package -Ddistributedlog
-fi
-if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$WEBSITE_MODIFIED" == "true" ]; then
- cd $BK_HOME/site
- make clean
- # run the docker image to build the website
- ./docker/ci.sh
+if [ "xtrue" == "x${STREAM_DISABLED}" ]; then
+ mvn --batch-mode clean install -DskipTests
+ # this command should be executed correctly
+ ${BK_HOME}/bin/bookkeeper help
+else
+ mvn --batch-mode clean apache-rat:check compile spotbugs:check install -DskipTests -Dstream
+ $BK_HOME/dev/check-binary-license ./bookkeeper-dist/all/target/bookkeeper-all-*-bin.tar.gz;
+ $BK_HOME/dev/check-binary-license ./bookkeeper-dist/server/target/bookkeeper-server-*-bin.tar.gz;
+ if [ "$DLOG_MODIFIED" == "true" ]; then
+ cd $BK_HOME/stream/distributedlog
+ mvn --batch-mode clean package -Ddistributedlog
+ fi
+ if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$WEBSITE_MODIFIED" == "true" ]; then
+ cd $BK_HOME/site
+ make clean
+ # run the docker image to build the website
+ ./docker/ci.sh
+ fi
fi
diff --git a/bin/bookkeeper b/bin/bookkeeper
index 38280a1..a207ff7 100755
--- a/bin/bookkeeper
+++ b/bin/bookkeeper
@@ -18,6 +18,8 @@
# * limitations under the License.
# */
+set -e
+
BINDIR=`dirname "$0"`
BK_HOME=`cd ${BINDIR}/..;pwd`
@@ -36,12 +38,12 @@ 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
+ if [[ "${TABLE_SERVICE_SETTING}" =~ ^extraServerComponents.* ]]; then
ENABLE_TABLE_SERVICE="true"
fi
fi
-if [ \( "x$1" == "xstandalone" \) -o \( "x${ENABLE_TABLE_SERVICE}" != "x" \) ]; then
+if [ \( "x$1" == "xstandalone" \) -o \( "x${ENABLE_TABLE_SERVICE}" == "xtrue" \) ]; then
BOOKIE_MODULE_PATH=stream/server
BOOKIE_MODULE_NAME="(org.apache.bookkeeper-)?stream-storage-server"
else
diff --git a/pom.xml b/pom.xml
index af3cefa..4d210a3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -60,13 +60,13 @@
<module>bookkeeper-benchmark</module>
<module>bookkeeper-stats-providers</module>
<module>bookkeeper-http</module>
- <module>shaded</module>
- <module>tests</module>
- <module>bookkeeper-dist</module>
- <module>microbenchmarks</module>
<module>stream/distributedlog</module>
<module>tools</module>
<module>metadata-drivers</module>
+ <module>bookkeeper-dist</module>
+ <module>shaded</module>
+ <module>microbenchmarks</module>
+ <module>tests</module>
</modules>
<mailingLists>
<mailingList>
diff --git a/tools/pom.xml b/tools/pom.xml
index 37e6375..2981bbb 100644
--- a/tools/pom.xml
+++ b/tools/pom.xml
@@ -27,7 +27,6 @@
<packaging>pom</packaging>
<modules>
<module>framework</module>
- <module>perf</module>
<module>all</module>
</modules>
<profiles>
@@ -42,6 +41,7 @@
<modules>
<!-- enable building stream storage cli -->
<module>stream</module>
+ <module>perf</module>
</modules>
</profile>
</profiles>