Skip to content

Commit

Permalink
dev/make-distribution.sh should also support multi-spark-version
Browse files Browse the repository at this point in the history
  • Loading branch information
allwefantasy committed Dec 17, 2018
1 parent 113b15e commit fb96cbd
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 29 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ You also can refer this: [Compile Assistance](https://streamingpro.rebiekong.com
git clone https://github.com/allwefantasy/streamingpro .
cd streamingpro
./dev/make-distribution.sh
export MLSQL_SPARK_VERSIOIN=2.3;export DRY_RUN=false && ./dev/make-distribution.sh
cp streamingpro-bin-1.1.3.tgz /tmp
cd /tmp && tar xzvf streamingpro-bin-1.1.3.tgz
cp streamingpro-bin-x.x.x.tgz /tmp
cd /tmp && tar xzvf streamingpro-bin-x.x.x.tgz
cd /tmp/streamingpro
export SPARK_HOME="....." ; ./start-local.sh
Expand All @@ -51,14 +51,16 @@ export SPARK_HOME="....." ; ./start-local.sh
* Chen Fu/cfmcgrady#gmail.com
* Geng Yifei/pigeongeng#gmail.com
* wanp1989/wanp1989#126.com
* chenliang613
* RebieKong
* CoderOverflow
* ghsuzzy
* xubo245
* zhuohuwu0603
* liyubin117
* RebieKong
* 9bbword


----------
[![HitCount](http://hits.dwyl.io/allwefantasy/streamingpro.svg)](http://hits.dwyl.io/allwefantasy/streamingpro)

20 changes: 2 additions & 18 deletions dev/make-distribution.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
#!/bin/bash
rm -rf /tmp/temp_ServiceFramework
git clone --depth 1 https://github.com/allwefantasy/ServiceFramework.git /tmp/temp_ServiceFramework
cd /tmp/temp_ServiceFramework
mvn install -DskipTests -Pjetty-9 -Pweb-include-jetty-9

cd -

mvn -DskipTests clean package \
-Pspark-2.3.0 \
-Pstreamingpro-spark-2.3.0-adaptor \
-Ponline \
-Pscala-2.11 \
-Pdsl \
-Passembly \
-Pcrawler \
-Phive-thrift-server \
-Pxgboost \
-Pcarbondata
export DISTRIBUTION=true
./dev/package.sh
20 changes: 13 additions & 7 deletions dev/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Inputs are specified with the following environment variables:
MLSQL_SPARK_VERSIOIN - the spark version, 2.2/2.3/2.4
DRY_RUN true|false
DISTRIBUTION true|false
EOF
exit 1
}
Expand All @@ -19,20 +20,23 @@ if [[ $@ == *"help"* ]]; then
exit_with_usage
fi

for env in MLSQL_SPARK_VERSIOIN DRY_RUN; do
for env in MLSQL_SPARK_VERSIOIN DRY_RUN DISTRIBUTION; do
if [[ -z "${!env}" ]]; then
echo "===$env must be set to run this script==="
echo "===Please run ./dev/package.sh help to get how to use.==="
exit 1
fi
done

if [[ ${DRY_RUN} != "true" ]];then
rm -rf /tmp/temp_ServiceFramework
git clone --depth 1 https://github.com/allwefantasy/ServiceFramework.git /tmp/temp_ServiceFramework
cd /tmp/temp_ServiceFramework
mvn install -DskipTests -Pjetty-9 -Pweb-include-jetty-9

cd -
fi


BASE_PROFILES="-Pscala-2.11 -Ponline -Phive-thrift-server -Pcarbondata -Pcrawler"

Expand All @@ -44,20 +48,22 @@ fi

BASE_PROFILES="$BASE_PROFILES -Pspark-$MLSQL_SPARK_VERSIOIN.0 -Pstreamingpro-spark-$MLSQL_SPARK_VERSIOIN.0-adaptor"

if [[ ${DISTRIBUTION} == "true" ]];then
BASE_PROFILES="$BASE_PROFILES -Passembly"
else
BASE_PROFILES="$BASE_PROFILES -Pshade -pl streamingpro-mlsql -am"
fi

export MAVEN_OPTS="-Xmx6000m"

if [[ ${DRY_RUN} == "true" ]];then

cat << EOF
mvn clean package \
-Pshade \
-DskipTests \
-pl streamingpro-mlsql \
-am ${BASE_PROFILES}
mvn clean package -DskipTests ${BASE_PROFILES}
EOF

else
mvn clean package -Pshade -DskipTests -pl streamingpro-mlsql -am ${BASE_PROFILES}
mvn clean package -DskipTests ${BASE_PROFILES}
fi


Expand Down

0 comments on commit fb96cbd

Please sign in to comment.