From 1ee31203e8b83bd35aa19c44b01ae2ea525fed41 Mon Sep 17 00:00:00 2001 From: ascrutae Date: Tue, 17 May 2016 18:57:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=9E=9Clog=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9=E4=B8=8D=E5=AD=98=E5=9C=A8=EF=BC=8C=E5=88=99=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- skywalking-analysis/bin/start-analysis.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/skywalking-analysis/bin/start-analysis.sh b/skywalking-analysis/bin/start-analysis.sh index f7082314e..e0b0a5956 100755 --- a/skywalking-analysis/bin/start-analysis.sh +++ b/skywalking-analysis/bin/start-analysis.sh @@ -9,6 +9,11 @@ HBASE_HOME=${HOME}/hbase-1.1.2 #check hadoop home HADOOP_HOME=${HOME}/hadoop-2.6.0 +SW_RT_LOG_DIR=${SW_ANALYSIS_HOME}/log +if [ ! -d "$SW_RT_LOG_DIR" ]; then + mkdir -p $SW_RT_LOG_DIR +fi + #check skywalking runtime config directory is exisit, if not, will create it. SW_RT_CONF_DIR="${SW_ANALYSIS_HOME}/runtime-conf" if [ ! -d "$SW_RT_CONF_DIR" ]; then @@ -92,7 +97,7 @@ END_TIME=`date --date='10 minute ago' "+%Y-%m-%d/%H:%M:%S"` ## execute command echo "Begin to analysis the buried point data between ${START_TIME} to ${END_TIME}." export HADOOP_CLASSPATH=`${HBASE_HOME}/bin/hbase classpath` -nohup ${HADOOP_HOME}/bin/hadoop jar skywalking-analysis-1.0-SNAPSHOT.jar -Dskywalking.analysis.mode=${SW_ANALYSIS_MODE} ${START_TIME} ${END_TIME} > ${SW_ANALYSIS_HOME}/log/map-reduce.log 2>&1 & +nohup ${HADOOP_HOME}/bin/hadoop jar skywalking-analysis-1.0-SNAPSHOT.jar -Dskywalking.analysis.mode=${SW_ANALYSIS_MODE} ${START_TIME} ${END_TIME} > ${SW_RT_LOG_DIR}/map-reduce.log 2>&1 & CURRENT_PID=`echo $!`