Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张浩
/
BrBigDataTest
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
1f2e4db3
...
1f2e4db348a50ff5afd97b989dcc4319c7f5998a
authored
2021-04-20 15:08:03 +0800
by
zhanghao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
0f358da6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
11 deletions
run.sh
shell/back_up.hql
run.sh
View file @
1f2e4db
#!/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
...
...
shell/back_up.hql
View file @
1f2e4db
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
...
...
Please
register
or
sign in
to post a comment