Commit 1f2e4db3 1f2e4db348a50ff5afd97b989dcc4319c7f5998a by zhanghao

commit

1 parent 0f358da6
#!/bin/bash
#mvn clean package -DskipTests
#hadoop fs -rm /input/data/$1
#hadoop fs -put ../$1 /input/data/$1
#hadoop jar ./target/BrBigDataTest-1.0.0.jar com.bigdata.test.ETLApp /input/data/$1 /input/etl/
#sleep 3
#hive -f ./shell/load_data.hql
#total=$(hive -f ./shell/select.hql)
#result=$(echo $total | tr " " ",")
#curl http://192.168.8.113:9090/tool/hadoopTotal?total=${result}
$(hive -hivevar name=$2 -f ./shell/back_up.hql)
\ No newline at end of file
time=log-$(date -v-1H +%Y-%m-%d.%H).log
backupname=qa_log_$(date -v-1H +%Y_%m_%d_%H)
scp -P 61702 -r test@123.56.14.255:/home/data/logs/logstash/litetuo/asst-gateway/$time ../
mvn clean package -DskipTests
hadoop fs -rm /input/data/$time
hadoop fs -put ../$time /input/data/$time
hadoop jar ./target/BrBigDataTest-1.0.0.jar com.bigdata.test.ETLApp /input/data/$time /input/etl/
sleep 3
hive -f ./shell/load_data.hql
total=$(hive -f ./shell/select.hql)
result=$(echo $total | tr " " ",")
curl http://192.168.8.113:9090/tool/hadoopTotal?total=${result}
$(hive -hivevar name=$backupname -f ./shell/back_up.hql)
hadoop fs -rm /input/data/$time
rm ../$time
\ No newline at end of file
......
use testdb;
create table ${hivevar:name} as select * from qa_log
\ No newline at end of file
drop table ${hivevar:name};
create table ${hivevar:name} as select * from qa_log;
\ No newline at end of file
......