You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2015/02/12 06:42:57 UTC

[07/50] incubator-kylin git commit: refactor script

refactor script


Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/5038abed
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/5038abed
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/5038abed

Branch: refs/heads/inverted-index
Commit: 5038abed209d1e41cb06bcd72bee780e0c96e4e4
Parents: e590e3e
Author: qianhao.zhou <qi...@ebay.com>
Authored: Tue Feb 10 16:49:08 2015 +0800
Committer: qianhao.zhou <qi...@ebay.com>
Committed: Tue Feb 10 16:49:08 2015 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/common/KylinConfig.java    |   2 -
 conf/kylin.properties                           |   6 +-
 .../test_case_data/localmeta/kylin.properties   |   7 +-
 .../localmeta_v1/kylin.properties               |   7 +-
 .../minicluster/b-kylin/kylin.properties        |   8 +-
 .../minicluster/b-kylin/meta/kylin.properties   |   3 -
 .../test_case_data/minicluster/kylin.properties |   8 +-
 .../sandbox-hdp21/kylin.properties              |   7 +-
 .../test_case_data/sandbox/kylin.properties     |   7 +-
 sbin/check-env.sh                               |  39 -----
 sbin/find-hive-dependency.sh                    |  19 --
 sbin/healthmon.sh                               |  33 ----
 sbin/kylin.sh                                   |  35 ----
 sbin/sandbox_deploy.sh                          | 172 -------------------
 sbin/start-kylin-sandbox.sh                     |  50 ------
 sbin/start-kylin.sh                             |  49 ------
 sbin/stop-kylin.sh                              |   4 -
 script/build.sh                                 |  17 ++
 script/compress.sh                              |   2 +-
 script/debug.sh                                 |  31 ----
 script/download-tomcat.sh                       |   1 +
 script/install.sh                               |  15 --
 script/package.sh                               |  38 ++--
 script/prepare.sh                               |   6 +
 script/release.sh                               |  33 ----
 server/ServiceConfig.md                         |   2 -
 26 files changed, 79 insertions(+), 522 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/common/src/main/java/org/apache/kylin/common/KylinConfig.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/kylin/common/KylinConfig.java b/common/src/main/java/org/apache/kylin/common/KylinConfig.java
index de8ca57..ef2c6e2 100644
--- a/common/src/main/java/org/apache/kylin/common/KylinConfig.java
+++ b/common/src/main/java/org/apache/kylin/common/KylinConfig.java
@@ -59,8 +59,6 @@ public class KylinConfig {
 
     public static final String KYLIN_JOB_CONCURRENT_MAX_LIMIT = "kylin.job.concurrent.max.limit";
 
-//    public static final String KYLIN_JOB_YARN_APP_REST_CHECK_STATUS_URL = "kylin.job.yarn.app.rest.check.status.url";
-
     public static final String KYLIN_JOB_YARN_APP_REST_CHECK_INTERVAL_SECONDS = "kylin.job.yarn.app.rest.check.interval.seconds";
 
     public static final String KYLIN_TMP_HDFS_DIR = "kylin.tmp.hdfs.dir";

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/conf/kylin.properties
----------------------------------------------------------------------
diff --git a/conf/kylin.properties b/conf/kylin.properties
index c292014..bf86a26 100755
--- a/conf/kylin.properties
+++ b/conf/kylin.properties
@@ -39,9 +39,6 @@ kylin.job.remote.cli.working.dir=/tmp/kylin
 # Max count of concurrent jobs running
 kylin.job.concurrent.max.limit=10
 
-# The url to check hadoop job status
-kylin.job.yarn.app.rest.check.status.url=
-
 # Time interval to check hadoop job status
 kylin.job.yarn.app.rest.check.interval.seconds=10
 
@@ -90,3 +87,6 @@ kylin.web.contact_mail=
 
 #env DEV|QA|PROD
 deploy.env=DEV
+
+###########################config info for sandbox#######################
+kylin.sandbox=true

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/examples/test_case_data/localmeta/kylin.properties
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/kylin.properties b/examples/test_case_data/localmeta/kylin.properties
index 9bbefc5..53d24ee 100644
--- a/examples/test_case_data/localmeta/kylin.properties
+++ b/examples/test_case_data/localmeta/kylin.properties
@@ -39,9 +39,6 @@ kylin.job.remote.cli.working.dir=/tmp/kylin
 # Max count of concurrent jobs running
 kylin.job.concurrent.max.limit=10
 
-# The url to check hadoop job status
-kylin.job.yarn.app.rest.check.status.url=http://sandbox:8088/ws/v1/cluster/apps/${job_id}?anonymous=true
-
 # Time interval to check hadoop job status
 kylin.job.yarn.app.rest.check.interval.seconds=10
 
@@ -63,3 +60,7 @@ acl.defaultRole=
 ganglia.group=
 ganglia.port=8664
 
+###########################config info for sandbox#######################
+kylin.sandbox=true
+
+

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/examples/test_case_data/localmeta_v1/kylin.properties
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta_v1/kylin.properties b/examples/test_case_data/localmeta_v1/kylin.properties
index 9b8b90a..96439b4 100644
--- a/examples/test_case_data/localmeta_v1/kylin.properties
+++ b/examples/test_case_data/localmeta_v1/kylin.properties
@@ -39,9 +39,6 @@ kylin.job.remote.cli.working.dir=/tmp/kylin
 # Max count of concurrent jobs running
 kylin.job.concurrent.max.limit=10
 
-# The url to check hadoop job status
-kylin.job.yarn.app.rest.check.status.url=http://sandbox:8088/ws/v1/cluster/apps/${job_id}?anonymous=true
-
 # Time interval to check hadoop job status
 kylin.job.yarn.app.rest.check.interval.seconds=10
 
@@ -63,3 +60,7 @@ acl.defaultRole=
 ganglia.group=
 ganglia.port=8664
 
+###########################config info for sandbox#######################
+kylin.sandbox=true
+
+

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/examples/test_case_data/minicluster/b-kylin/kylin.properties
----------------------------------------------------------------------
diff --git a/examples/test_case_data/minicluster/b-kylin/kylin.properties b/examples/test_case_data/minicluster/b-kylin/kylin.properties
index 699a91b..19c8de6 100644
--- a/examples/test_case_data/minicluster/b-kylin/kylin.properties
+++ b/examples/test_case_data/minicluster/b-kylin/kylin.properties
@@ -39,9 +39,6 @@ kylin.job.remote.cli.working.dir=/tmp/kylin
 # Max count of concurrent jobs running
 kylin.job.concurrent.max.limit=10
 
-# The url to check hadoop job status
-kylin.job.yarn.app.rest.check.status.url=http://sandbox:8088/ws/v1/cluster/apps/${job_id}?anonymous=true
-
 # Time interval to check hadoop job status
 kylin.job.yarn.app.rest.check.interval.seconds=1
 
@@ -60,4 +57,7 @@ ldap.service.groupSearchBase=
 acl.adminRole=
 acl.defaultRole=
 ganglia.group=
-ganglia.port=8664
\ No newline at end of file
+ganglia.port=8664
+
+###########################config info for sandbox#######################
+kylin.sandbox=true

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/examples/test_case_data/minicluster/b-kylin/meta/kylin.properties
----------------------------------------------------------------------
diff --git a/examples/test_case_data/minicluster/b-kylin/meta/kylin.properties b/examples/test_case_data/minicluster/b-kylin/meta/kylin.properties
index 699a91b..419b9e8 100644
--- a/examples/test_case_data/minicluster/b-kylin/meta/kylin.properties
+++ b/examples/test_case_data/minicluster/b-kylin/meta/kylin.properties
@@ -39,9 +39,6 @@ kylin.job.remote.cli.working.dir=/tmp/kylin
 # Max count of concurrent jobs running
 kylin.job.concurrent.max.limit=10
 
-# The url to check hadoop job status
-kylin.job.yarn.app.rest.check.status.url=http://sandbox:8088/ws/v1/cluster/apps/${job_id}?anonymous=true
-
 # Time interval to check hadoop job status
 kylin.job.yarn.app.rest.check.interval.seconds=1
 

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/examples/test_case_data/minicluster/kylin.properties
----------------------------------------------------------------------
diff --git a/examples/test_case_data/minicluster/kylin.properties b/examples/test_case_data/minicluster/kylin.properties
index 53f003c..7816cad 100644
--- a/examples/test_case_data/minicluster/kylin.properties
+++ b/examples/test_case_data/minicluster/kylin.properties
@@ -45,9 +45,6 @@ kylin.job.remote.cli.working.dir=/tmp/kylin
 # Max count of concurrent jobs running
 kylin.job.concurrent.max.limit=10
 
-# The url to check hadoop job status
-kylin.job.yarn.app.rest.check.status.url=http://127.0.0.1:8088/ws/v1/cluster/apps/${job_id}?anonymous=true
-
 # Time interval to check hadoop job status
 kylin.job.yarn.app.rest.check.interval.seconds=10
 
@@ -66,4 +63,7 @@ ldap.service.groupSearchBase=
 acl.adminRole=
 acl.defaultRole=
 ganglia.group=
-ganglia.port=8664
\ No newline at end of file
+ganglia.port=8664
+
+###########################config info for sandbox#######################
+kylin.sandbox=true

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/examples/test_case_data/sandbox-hdp21/kylin.properties
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox-hdp21/kylin.properties b/examples/test_case_data/sandbox-hdp21/kylin.properties
index a56ffd1..7474283 100755
--- a/examples/test_case_data/sandbox-hdp21/kylin.properties
+++ b/examples/test_case_data/sandbox-hdp21/kylin.properties
@@ -39,9 +39,6 @@ kylin.job.remote.cli.working.dir=/tmp/kylin
 # Max count of concurrent jobs running
 kylin.job.concurrent.max.limit=10
 
-# The url to check hadoop job status
-kylin.job.yarn.app.rest.check.status.url=http://sandbox:8088/ws/v1/cluster/apps/${job_id}?anonymous=true
-
 # Time interval to check hadoop job status
 kylin.job.yarn.app.rest.check.interval.seconds=10
 
@@ -70,3 +67,7 @@ mail.host=
 mail.username=
 mail.password=
 mail.sender=
+
+###########################config info for sandbox#######################
+kylin.sandbox=true
+

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/examples/test_case_data/sandbox/kylin.properties
----------------------------------------------------------------------
diff --git a/examples/test_case_data/sandbox/kylin.properties b/examples/test_case_data/sandbox/kylin.properties
index a79946b..adc0dda 100755
--- a/examples/test_case_data/sandbox/kylin.properties
+++ b/examples/test_case_data/sandbox/kylin.properties
@@ -39,9 +39,6 @@ kylin.job.remote.cli.working.dir=/tmp/kylin
 # Max count of concurrent jobs running
 kylin.job.concurrent.max.limit=10
 
-# The url to check hadoop job status
-kylin.job.yarn.app.rest.check.status.url=http://sandbox:8088/ws/v1/cluster/apps/${job_id}?anonymous=true
-
 # Time interval to check hadoop job status
 kylin.job.yarn.app.rest.check.interval.seconds=10
 
@@ -90,3 +87,7 @@ kylin.web.contact_mail=
 
 #env DEV|QA|PROD
 deploy.env=DEV
+
+###########################config info for sandbox#######################
+kylin.sandbox=true
+

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/sbin/check-env.sh
----------------------------------------------------------------------
diff --git a/sbin/check-env.sh b/sbin/check-env.sh
deleted file mode 100755
index 3bef6c4..0000000
--- a/sbin/check-env.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-
-echo "Checking KYLIN_HOME..."
-if [ -z "$KYLIN_HOME" ]
-then
-    echo 'please make sure KYLIN_HOME has been set'
-    exit 1
-else
-    echo "KYLIN_HOME is set to ${KYLIN_HOME}"
-fi
-
-echo "Checking hbase..."
-if [ -z "$(command -v hbase version)" ]
-then
-    echo "Please make sure the user has the privilege to run hbase shell"
-    exit 1
-else
-    echo "hbase check passed"
-fi
-
-echo "Checking hive..."
-if [ -z "$(command -v hive --version)" ]
-then
-    echo "Please make sure the user has the privilege to run hive shell"
-    exit 1
-else
-    echo "hive check passed"
-fi
-
-echo "Checking hadoop..."
-if [ -z "$(command -v hadoop version)" ]
-then
-    echo "Please make sure the user has the privilege to run hadoop shell"
-    exit 1
-else
-    echo "hadoop check passed"
-fi
-
-exit 0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/sbin/find-hive-dependency.sh
----------------------------------------------------------------------
diff --git a/sbin/find-hive-dependency.sh b/sbin/find-hive-dependency.sh
deleted file mode 100644
index e03495a..0000000
--- a/sbin/find-hive-dependency.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-hive_env=`hive -e set | grep 'env:CLASSPATH'`
-
-hive_classpath=`echo $hive_env | grep 'env:CLASSPATH' | awk -F '=' '{print $2}'`
-arr=(`echo $hive_classpath | cut -d ":"  --output-delimiter=" " -f 1-`)
-hive_exec_path=
-for data in ${arr[@]}
-do
-    result=`echo $data | grep 'hive-exec.jar'`
-    if [ $result ]
-    then
-        hive_exec_path=$data
-    fi
-done
-hdp_home=`echo $hive_exec_path | awk -F '/hive/lib/' '{print $1}'`
-
-hive_dependency=/usr/hdp/current/hive-client/conf/:${hdp_home}/hive/lib/*:${hdp_home}/hive-hcatalog/share/hcatalog/*
-export hive_dependency
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/sbin/healthmon.sh
----------------------------------------------------------------------
diff --git a/sbin/healthmon.sh b/sbin/healthmon.sh
deleted file mode 100644
index 439eef4..0000000
--- a/sbin/healthmon.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env bash
-
-ALERT="your@email.com"
-
-OUTPUT=$(
-	curl --max-time 20 -# \
-	--data '{"sql":"select count(*) from test_kylin_fact","offset":0,"limit":50000,"acceptPartial":true,"project":"default"}' \
-	-H "Authorization:Basic QURNSU46S1lMSU4=" \
-	-H "Content-Type:application/json;charset=UTF-8" \
-	http://localhost:7070/kylin/api/query \
-)
-
-# ----------------------------------------------------------------------------
-
-date
-
-if [[ $OUTPUT == *"results"* ]]; then
-	echo "Good."
-else
-	echo "Bad."
-	TS_FILE=/tmp/kylin_healthmon_ts
-	LAST_TS=`stat -c%Y $TS_FILE 2>/dev/null`
-	CURR_TS=`date +%s`
-	echo last: $LAST_TS
-	echo curr: $CURR_TS
-	if (( ${LAST_TS:-"0"} < $CURR_TS - 3600 )); then
-		echo "Sending mail..."
-		echo "Kylin Prod health check failed as of $(date)." | mail -s "KYLIN PROD DOWN" $ALERT
-		if [ "$?" == "0" ]; then
-			touch $TS_FILE
-		fi
-	fi
-fi

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/sbin/kylin.sh
----------------------------------------------------------------------
diff --git a/sbin/kylin.sh b/sbin/kylin.sh
deleted file mode 100755
index b264720..0000000
--- a/sbin/kylin.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-if [ ! -z "$KYLIN_LD_LIBRARY_PATH" ]
-then
-    echo "KYLIN_LD_LIBRARY_PATH is set to $KYLIN_LD_LIBRARY_PATH"
-else
-    exit 1
-fi
-
-#The location of all hadoop/hbase configurations are difficult to get.
-#Plus, some of the system properties are secretly set in hadoop/hbase shell command.
-#For example, in hdp 2.2, there is a system property called hdp.version,
-#which we cannot get until running hbase or hadoop shell command.
-#
-#To save all these troubles, we use hbase runjar to start tomcat.
-#In this way we no longer need to explicitly configure hadoop/hbase related classpath for tomcat,
-#hbase command will do all the dirty tasks for us:
-if [ "$1" = "start" ] ; then
-        export HBASE_CLASSPATH_PREFIX=/etc/kylin:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar:${CATALINA_HOME}/lib/*:$HBASE_CLASSPATH_PREFIX
-        hbase -Djava.util.logging.config.file=${CATALINA_HOME}/conf/logging.properties -Djava.library.path=${KYLIN_LD_LIBRARY_PATH} -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true -Dspring.profiles.active=sandbox -Djava.endorsed.dirs=${CATALINA_HOME}/endorsed  -Dcatalina.base=${CATALINA_HOME} -Dcatalina.home=${CATALINA_HOME} -Djava.io.tmpdir=${CATALINA_HOME}/temp  org.apache.hadoop.util.RunJar ${CATALINA_HOME}/bin/bootstrap.jar  org.apache.catalina.startup.Bootstrap start > ${CATALINA_HOME}/logs/kylin_sandbox.log 2>&1 &
-        echo "A new Kylin instance is started by $USER, stop it using \"kylin.sh stop\""
-        echo "Please visit http://<your_sandbox_ip>:7070/kylin to play with the cubes! (Useranme: ADMIN, Password: KYLIN)"
-        echo "You can check the log at ${CATALINA_HOME}/logs/kylin_sandbox.log"
-
-elif [ "$1" = "stop" ]; then
-        # kill all tomcats started by current user
-        ps -fu $USER | grep tomcat | grep -v "grep" | awk '{print $2}' | xargs kill
-        echo "all tomcats started by $USER are killed"
-
-else
-        echo "Usage: \"kylin.sh start\", or \"kylin.sh stop\""
-
-fi
-
-

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/sbin/sandbox_deploy.sh
----------------------------------------------------------------------
diff --git a/sbin/sandbox_deploy.sh b/sbin/sandbox_deploy.sh
deleted file mode 100755
index 7202f97..0000000
--- a/sbin/sandbox_deploy.sh
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/bin/bash
-
-set -o pipefail  # trace ERR through pipes
-set -o errtrace  # trace ERR through 'time command' and other functions
-
-function error() {
-SCRIPT="$0"           # script name
-LASTLINE="$1"         # line of error occurrence
-LASTERR="$2"          # error code
-echo "ERROR exit from ${SCRIPT} : line ${LASTLINE} with exit code ${LASTERR}"
-exit 1
-}
-
-function escape_sed_replacement(){
-        v=$1
-        v=$(sed -e 's/[\/&]/\\&/g' <<< $v)
-        echo $v
-}
-
-function escape_sed_pattern(){
-        v=$1
-        v=$(sed -e 's/[]\/$*.^|[]/\\&/g' <<< $v)
-        echo $v
-}
-
-trap 'error ${LINENO} ${?}' ERR
-
-echo ""
-echo "Welcome to use Kylin-Deploy script"
-echo "This script will help you:"
-echo "1. Check environment"
-echo "2. Build Kylin artifacts"
-echo "3. Prepare test cube related data"
-echo "Please make sure you are running this script on a hadoop CLI machine, and you have enough permissions."
-echo "Also, We assume you have installed: JAVA, TOMCAT, NPM and MAVEN."
-echo "[Warning] The installation may break existing tomcat applications on this CLI"
-echo ""
-
-
-[[ "$SILENT" ]] || ( read -p "Are you sure you want to proceed?(press Y or y to confirm) " -n 1 -r
-echo    # (optional) move to a new line
-if [[ ! $REPLY =~ ^[Yy]$ ]]
-then
-    echo "Not going to proceed, quit without finishing! You can rerun the script to have another try."
-    exit 1
-fi )
-
-echo "Checking JAVA status..."
-
-if [ -z "$JAVA_HOME" ]
-then
-    echo "Please set JAVA_HOME so that Kylin-Deploy can proceed"
-    exit 1
-else
-    echo "JAVA_HOME is set to $JAVA_HOME"
-fi
-
-if [ -d "$JAVA_HOME" ]
-then
-    echo "$JAVA_HOME exists"
-else
-    echo " $JAVA_HOME does not exist or is not a directory."
-    exit 1
-fi
-
-echo "Checking tomcat status..."
-
-if [ -z "$CATALINA_HOME" ]
-then
-    echo "Please set CATALINA_HOME so that Kylin-Deploy knows where to start tomcat"
-    exit 1
-else
-    echo "CATALINA_HOME is set to $CATALINA_HOME"
-fi
-
-if [ -d "$CATALINA_HOME" ]
-then
-    echo "$CATALINA_HOME exists"
-else
-    echo " $CATALINA_HOME does not exist or is not a directory."
-    exit 1
-fi
-
-echo "Checking maven..."
-
-if [ -z "$(command -v mvn)" ]
-then
-    echo "Please install maven first so that Kylin-Deploy can proceed"
-    exit 1
-else
-    echo "maven check passed"
-fi
-
-echo "Checking npm..."
-
-if [ -z "$(command -v npm)" ]
-then
-    echo "Please install npm first so that Kylin-Deploy can proceed"
-    exit 1
-else
-    echo "npm check passed"
-fi
-
-KYLIN_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )"  && pwd )"
-echo "Kylin home folder path is $KYLIN_HOME"
-cd $KYLIN_HOME
-
-
-echo "Building and packaging..."
-source ./package.sh
-
-echo "retrieving classpath..."
-cd $KYLIN_HOME/job/target
-JOB_JAR_NAME="kylin-job-latest.jar"
-#export hbase configs, most of the configurations are useless now, but KYLIN_HBASE_CONF_PATH is used by SampleCubeSetupTest now
-hbase org.apache.hadoop.util.RunJar $JOB_JAR_NAME org.apache.kylin.job.deployment.HbaseConfigPrinterCLI /tmp/kylin_retrieve.sh
-#load config variables
-source /tmp/kylin_retrieve.sh
-
-cd $KYLIN_HOME
-mkdir -p /etc/kylin
-
-HOSTNAME=`hostname`
-DEFAULT_CHECK_URL="kylin.job.yarn.app.rest.check.status.url=http://sandbox"
-DEFAULT_SERVER_LIST="kylin.rest.servers=localhost"
-NEW_CHECK_URL_PREFIX="kylin.job.yarn.app.rest.check.status.url=http://"
-NEW_SERVER_LIST_PREFIX="kylin.rest.servers="
-
-#escape special characters for sed
-DEFAULT_CHECK_URL=$(escape_sed_pattern $DEFAULT_CHECK_URL)
-DEFAULT_SERVER_LIST=$(escape_sed_pattern $DEFAULT_SERVER_LIST)
-NEW_CHECK_URL_PREFIX=$(escape_sed_replacement $NEW_CHECK_URL_PREFIX)
-NEW_SERVER_LIST_PREFIX=$(escape_sed_replacement $NEW_SERVER_LIST_PREFIX)
-HOSTNAME=$(escape_sed_replacement $HOSTNAME)
-
-#deploy kylin.properties to /etc/kylin
-cat examples/test_case_data/sandbox/kylin.properties | \
-    sed -e "s/${DEFAULT_CHECK_URL}/${NEW_CHECK_URL_PREFIX}${HOSTNAME}/g"  | \
-    sed -e "s/${DEFAULT_SERVER_LIST}/${NEW_SERVER_LIST_PREFIX}${HOSTNAME}/g"   >  /etc/kylin/kylin.properties
-
-
-
-# 1. generate synthetic fact table(test_kylin_fact) data and dump it into hive
-# 2. create empty cubes on these data, ready to be built
-cd $KYLIN_HOME
-mvn test -Dtest=org.apache.kylin.job.SampleCubeSetupTest -DfailIfNoTests=false
-
-#overwrite server.xml
-mv ${CATALINA_HOME}/conf/server.xml ${CATALINA_HOME}/conf/server.xml.bak
-cp deploy/server.xml ${CATALINA_HOME}/conf/server.xml
-echo "server.xml overwritten..."
-
-#deploy kylin.war
-rm -rf $CATALINA_HOME/webapps/kylin
-rm -f $CATALINA_HOME/webapps/kylin.war
-cp $KYLIN_HOME/server/target/kylin.war $CATALINA_HOME/webapps/
-chmod 644 $CATALINA_HOME/webapps/kylin.war
-echo "Tomcat war deployed..."
-
-echo "Kylin is deployed successfully!!!"
-echo ""
-echo ""
-echo "Please check the configuration:"
-echo ""
-echo "==================================================================="
-cat /etc/kylin/kylin.properties
-echo "==================================================================="
-echo ""
-echo "You can directly modify it by editing /etc/kylin/kylin.properties"
-echo "If you're using standard hadoop sandbox, you might keep it untouched"
-echo "After checking, please start kylin by using \"./kylin.sh start\""
-

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/sbin/start-kylin-sandbox.sh
----------------------------------------------------------------------
diff --git a/sbin/start-kylin-sandbox.sh b/sbin/start-kylin-sandbox.sh
deleted file mode 100644
index b8912f2..0000000
--- a/sbin/start-kylin-sandbox.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-
-dir=$(dirname ${0})
-
-tomcat_root=${dir}/../tomcat
-export tomcat_root
-
-sh ${dir}/check-env.sh || { exit 1; }
-
-#if [ ! -z "$KYLIN_LD_LIBRARY_PATH" ]
-#then
-#    echo "KYLIN_LD_LIBRARY_PATH is set to $KYLIN_LD_LIBRARY_PATH"
-#else
-#    exit 1
-#fi
-
-#The location of all hadoop/hbase configurations are difficult to get.
-#Plus, some of the system properties are secretly set in hadoop/hbase shell command.
-#For example, in hdp 2.2, there is a system property called hdp.version,
-#which we cannot get until running hbase or hadoop shell command.
-#
-#To save all these troubles, we use hbase runjar to start tomcat.
-#In this way we no longer need to explicitly configure hadoop/hbase related classpath for tomcat,
-#hbase command will do all the dirty tasks for us:
-
-#-Djava.library.path=${KYLIN_LD_LIBRARY_PATH} \
-
-
-rm -rf ${tomcat_root}/webapps/*
-cp ${dir}/../lib/kylin-server-*.war ${tomcat_root}/webapps/kylin.war
-
-source ${dir}/find-hive-dependency.sh
-
-export HBASE_CLASSPATH_PREFIX=${tomcat_root}/bin/bootstrap.jar:${tomcat_root}/bin/tomcat-juli.jar:${tomcat_root}/lib/*:$HBASE_CLASSPATH_PREFIX
-export HBASE_CLASSPATH=$hive_dependency:${HBASE_CLASSPATH}
-
-hbase -Djava.util.logging.config.file=${tomcat_root}/conf/logging.properties \
--Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
--Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true \
--Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true \
--Djava.endorsed.dirs=${tomcat_root}/endorsed  \
--Dcatalina.base=${tomcat_root} \
--Dcatalina.home=${tomcat_root} \
--Djava.io.tmpdir=${tomcat_root}/temp  \
--Dkylin.hive.dependency=${hive_dependency} \
--Dspring.profiles.active=sandbox \
-org.apache.hadoop.util.RunJar ${tomcat_root}/bin/bootstrap.jar  org.apache.catalina.startup.Bootstrap start > ${tomcat_root}/logs/kylin_sandbox.log 2>&1 &
-echo "A new Kylin instance is started by $USER, stop it using \"kylin.sh stop\""
-echo "Please visit http://<your_sandbox_ip>:7070/kylin to play with the cubes! (Useranme: ADMIN, Password: KYLIN)"
-echo "You can check the log at ${tomcat_root}/logs/kylin_sandbox.log"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/sbin/start-kylin.sh
----------------------------------------------------------------------
diff --git a/sbin/start-kylin.sh b/sbin/start-kylin.sh
deleted file mode 100644
index d7436f4..0000000
--- a/sbin/start-kylin.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh
-
-dir=$(dirname ${0})
-
-tomcat_root=${dir}/../tomcat
-export tomcat_root
-
-sh ${dir}/check-env.sh || { exit 1; }
-
-#if [ ! -z "$KYLIN_LD_LIBRARY_PATH" ]
-#then
-#    echo "KYLIN_LD_LIBRARY_PATH is set to $KYLIN_LD_LIBRARY_PATH"
-#else
-#    exit 1
-#fi
-
-#The location of all hadoop/hbase configurations are difficult to get.
-#Plus, some of the system properties are secretly set in hadoop/hbase shell command.
-#For example, in hdp 2.2, there is a system property called hdp.version,
-#which we cannot get until running hbase or hadoop shell command.
-#
-#To save all these troubles, we use hbase runjar to start tomcat.
-#In this way we no longer need to explicitly configure hadoop/hbase related classpath for tomcat,
-#hbase command will do all the dirty tasks for us:
-
-#-Djava.library.path=${KYLIN_LD_LIBRARY_PATH} \
-
-
-rm -rf ${tomcat_root}/webapps/*
-cp ${dir}/../lib/kylin-server-*.war ${tomcat_root}/webapps/kylin.war
-
-source ${dir}/find-hive-dependency.sh
-
-export HBASE_CLASSPATH_PREFIX=${tomcat_root}/bin/bootstrap.jar:${tomcat_root}/bin/tomcat-juli.jar:${tomcat_root}/lib/*:$HBASE_CLASSPATH_PREFIX
-export HBASE_CLASSPATH=$hive_dependency:${HBASE_CLASSPATH}
-
-hbase -Djava.util.logging.config.file=${tomcat_root}/conf/logging.properties \
--Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
--Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true \
--Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true \
--Djava.endorsed.dirs=${tomcat_root}/endorsed  \
--Dcatalina.base=${tomcat_root} \
--Dcatalina.home=${tomcat_root} \
--Djava.io.tmpdir=${tomcat_root}/temp  \
--Dkylin.hive.dependency=${hive_dependency} \
-org.apache.hadoop.util.RunJar ${tomcat_root}/bin/bootstrap.jar  org.apache.catalina.startup.Bootstrap start > ${tomcat_root}/logs/kylin_sandbox.log 2>&1 &
-echo "A new Kylin instance is started by $USER, stop it using \"kylin.sh stop\""
-echo "Please visit http://<your_sandbox_ip>:7070/kylin to play with the cubes! (Useranme: ADMIN, Password: KYLIN)"
-echo "You can check the log at ${tomcat_root}/logs/kylin_sandbox.log"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/sbin/stop-kylin.sh
----------------------------------------------------------------------
diff --git a/sbin/stop-kylin.sh b/sbin/stop-kylin.sh
deleted file mode 100644
index 806513b..0000000
--- a/sbin/stop-kylin.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-ps -fu $USER | grep tomcat | grep -v "grep" | awk '{print $2}' | xargs kill
-echo "all tomcats started by $USER are killed"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/script/build.sh
----------------------------------------------------------------------
diff --git a/script/build.sh b/script/build.sh
new file mode 100644
index 0000000..08b2b0a
--- /dev/null
+++ b/script/build.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+echo "package back-end"
+
+dir=$(dirname ${0})
+cd ${dir}/..
+
+mvn clean install -DskipTests
+
+#package webapp
+echo 'package front-end'
+cd webapp
+npm install -g bower
+bower install
+npm install
+npm install -g grunt-cli
+grunt dev --buildEnv=dev

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/script/compress.sh
----------------------------------------------------------------------
diff --git a/script/compress.sh b/script/compress.sh
index ad0b352..6221b2b 100644
--- a/script/compress.sh
+++ b/script/compress.sh
@@ -13,6 +13,6 @@ fi
 
 #package tgz
 echo 'package tgz'
-tar -cvzf kylin-${version}.tgz lib sbin conf tomcat
+tar -cvzf kylin-${version}.tgz lib bin conf tomcat
 
 rm -rf tomcat/webapps/*

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/script/debug.sh
----------------------------------------------------------------------
diff --git a/script/debug.sh b/script/debug.sh
deleted file mode 100644
index bbf575f..0000000
--- a/script/debug.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-
-echo "Checking maven..."
-
-if [ -z "$(command -v mvn)" ]
-then
-    echo "Please install maven first so that Kylin-Deploy can proceed"
-    exit 1
-else
-    echo "maven check passed"
-fi
-
-echo "Checking npm..."
-
-if [ -z "$(command -v npm)" ]
-then
-    echo "Please install npm first so that Kylin-Deploy can proceed"
-    exit 1
-else
-    echo "npm check passed"
-fi
-
-dir=$(dirname ${0})
-cd ${dir}/..
-version=`mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\['`
-echo "kylin version: ${version}"
-export version
-
-sh script/package.sh || { exit 1; }
-sh script/prepare.sh || { exit 1; }
-

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/script/download-tomcat.sh
----------------------------------------------------------------------
diff --git a/script/download-tomcat.sh b/script/download-tomcat.sh
index 24ec279..a01b132 100644
--- a/script/download-tomcat.sh
+++ b/script/download-tomcat.sh
@@ -9,6 +9,7 @@ wget http://mirror.sdunix.com/apache/tomcat/tomcat-7/v7.0.57/bin/apache-tomcat-7
 
 tar -zxvf apache-tomcat-7.0.57.tar.gz
 mv apache-tomcat-7.0.57 tomcat
+rm -rf tomcat/webapps/*
 
 mv tomcat/conf/server.xml tomcat/conf/server.xml.bak
 cp deploy/server.xml tomcat/conf/server.xml

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/script/install.sh
----------------------------------------------------------------------
diff --git a/script/install.sh b/script/install.sh
deleted file mode 100755
index 6792fe0..0000000
--- a/script/install.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env bash
-
-
-cd ~
-wget http://apache.cs.uu.nl/dist/tomcat/tomcat-7/v7.0.56/bin/apache-tomcat-7.0.56.tar.gz
-tar -xzvf apache-tomcat-7.0.56.tar.gz
-export CATALINA_HOME=/root/apache-tomcat-7.0.56
-
-wget http://apache.proserve.nl/maven/maven-3/3.2.3/binaries/apache-maven-3.2.3-bin.tar.gz
-tar -xzvf apache-maven-3.2.3-bin.tar.gz
-ln -s /root/apache-maven-3.2.3/bin/mvn /usr/bin/mvn
-
-wget http://nodejs.org/dist/v0.10.32/node-v0.10.32-linux-x64.tar.gz
-tar -xzvf node-v0.10.32-linux-x64.tar.gz
-export PATH=/root/node-v0.10.32-linux-x64/bin:$PATH
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/script/package.sh
----------------------------------------------------------------------
diff --git a/script/package.sh b/script/package.sh
old mode 100644
new mode 100755
index 08b2b0a..6252690
--- a/script/package.sh
+++ b/script/package.sh
@@ -1,17 +1,33 @@
-#!/bin/sh
+#!/bin/bash
 
-echo "package back-end"
+echo "Checking maven..."
+
+if [ -z "$(command -v mvn)" ]
+then
+    echo "Please install maven first so that Kylin-Deploy can proceed"
+    exit 1
+else
+    echo "maven check passed"
+fi
+
+echo "Checking npm..."
+
+if [ -z "$(command -v npm)" ]
+then
+    echo "Please install npm first so that Kylin-Deploy can proceed"
+    exit 1
+else
+    echo "npm check passed"
+fi
 
 dir=$(dirname ${0})
 cd ${dir}/..
+version=`mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\['`
+echo "kylin version: ${version}"
+export version
 
-mvn clean install -DskipTests
+sh script/build.sh || { exit 1; }
+sh script/prepare.sh || { exit 1; }
+sh script/download-tomcat.sh || { exit 1; }
+sh scirpt/compress.sh || { exit 1; }
 
-#package webapp
-echo 'package front-end'
-cd webapp
-npm install -g bower
-bower install
-npm install
-npm install -g grunt-cli
-grunt dev --buildEnv=dev

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/script/prepare.sh
----------------------------------------------------------------------
diff --git a/script/prepare.sh b/script/prepare.sh
index fe615fc..8a855e1 100644
--- a/script/prepare.sh
+++ b/script/prepare.sh
@@ -18,6 +18,12 @@ cp job/target/kylin-job-${version}-job.jar lib/kylin-job-${version}.jar
 cp storage/target/kylin-storage-${version}-coprocessor.jar lib/kylin-coprocessor-${version}.jar
 
 echo "add js css to war"
+if [ ! -d "webapp/dist" ]
+then
+    echo "error generate js files"
+    exit 1
+fi
+
 cd webapp/dist
 for f in * .[^.]*
 do

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/script/release.sh
----------------------------------------------------------------------
diff --git a/script/release.sh b/script/release.sh
deleted file mode 100755
index e0de140..0000000
--- a/script/release.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-
-echo "Checking maven..."
-
-if [ -z "$(command -v mvn)" ]
-then
-    echo "Please install maven first so that Kylin-Deploy can proceed"
-    exit 1
-else
-    echo "maven check passed"
-fi
-
-echo "Checking npm..."
-
-if [ -z "$(command -v npm)" ]
-then
-    echo "Please install npm first so that Kylin-Deploy can proceed"
-    exit 1
-else
-    echo "npm check passed"
-fi
-
-dir=$(dirname ${0})
-cd ${dir}/..
-version=`mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\['`
-echo "kylin version: ${version}"
-export version
-
-sh script/package.sh || { exit 1; }
-sh script/prepare.sh || { exit 1; }
-sh script/download-tomcat.sh || { exit 1; }
-sh scirpt/compress.sh || { exit 1; }
-

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5038abed/server/ServiceConfig.md
----------------------------------------------------------------------
diff --git a/server/ServiceConfig.md b/server/ServiceConfig.md
index 723557e..0f951be 100644
--- a/server/ServiceConfig.md
+++ b/server/ServiceConfig.md
@@ -33,10 +33,8 @@
 ##### kylin.job.remote.cli.password
 ##### kylin.job.remote.cli.working.dir
 ##### kylin.job.concurrent.max.limit
-##### kylin.job.yarn.app.rest.check.status.url
 ##### kylin.job.command.exe.type
 ##### kylin.job.admin.dls
 ##### kylin.job.step.timeout
-##### kylin.job.yarn.app.rest.check.status.url
 ##### kylin.job.yarn.app.rest.check.interval.seconds
 ##### kylin.job.concurrent.max.limit
\ No newline at end of file