commit
Showing
7 changed files
with
84 additions
and
0 deletions
run_linux_debug.sh
0 → 100755
| 1 | #!/bin/bash | ||
| 2 | hadoop fs -rm /input/debug/data/app.out | ||
| 3 | hadoop fs -put /home/test/logs/app.out /input/debug/data/app.out | ||
| 4 | hadoop jar ./target/BrBigDataTest-1.0.0.jar com.bigdata.test.ETLApp /input/debug/data/app.out /input/debug/etl/ | ||
| 5 | sleep 3 | ||
| 6 | |||
| 7 | hive -f ./shell_debug/load_data.hql | ||
| 8 | hive -f ./shell_debug/method_count.hql | ||
| 9 | hive -f ./shell_debug/biz_data_count.hql | ||
| 10 | hive -f ./shell_debug/biz_data_response.hql | ||
| 11 | |||
| 12 | hadoop fs -rm /input/debug/data/app.out | ||
| 13 | |||
| 14 | sqoop export --connect "jdbc:mysql://127.0.0.1:3306/bigdata" --username root --password zidonghua --table method_count_debug --export-dir /user/hive/warehouse/testdb.db/method_count_debug --input-fields-terminated-by '\t' | ||
| 15 | sleep 3 | ||
| 16 | sqoop export --connect "jdbc:mysql://127.0.0.1:3306/bigdata" --username root --password zidonghua --table biz_data_count_debug --export-dir /user/hive/warehouse/testdb.db/biz_data_count_debug --input-fields-terminated-by '\t' | ||
| 17 | sleep 3 | ||
| 18 | sqoop export --connect "jdbc:mysql://127.0.0.1:3306/bigdata" --username root --password zidonghua --table biz_data_response_debug --export-dir /user/hive/warehouse/testdb.db/biz_data_response_debug --input-fields-terminated-by '\t' |
shell_debug/biz_data_count.hql
0 → 100755
shell_debug/biz_data_response.hql
0 → 100755
shell_debug/create_table.hql
0 → 100755
| 1 | CREATE DATABASE IF NOT EXISTS testdb; | ||
| 2 | |||
| 3 | use testdb; | ||
| 4 | |||
| 5 | CREATE TABLE qa_log_debug( | ||
| 6 | rest string, | ||
| 7 | requestUri string, | ||
| 8 | request string, | ||
| 9 | response string, | ||
| 10 | status string, | ||
| 11 | method string, | ||
| 12 | uid string, | ||
| 13 | biz_data string, | ||
| 14 | code string, | ||
| 15 | trace string, | ||
| 16 | timestamp string | ||
| 17 | ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; | ||
| 18 | |||
| 19 | CREATE TABLE method_count_debug( | ||
| 20 | method string, | ||
| 21 | count string, | ||
| 22 | timestamp string | ||
| 23 | ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; | ||
| 24 | |||
| 25 | CREATE TABLE biz_data_count_debug( | ||
| 26 | method string, | ||
| 27 | biz_data string, | ||
| 28 | count string, | ||
| 29 | timestamp string | ||
| 30 | ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; | ||
| 31 | |||
| 32 | CREATE TABLE biz_data_response_debug( | ||
| 33 | method string, | ||
| 34 | biz_data string, | ||
| 35 | uid string, | ||
| 36 | timestamp string, | ||
| 37 | response string | ||
| 38 | ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
shell_debug/load_data.hql
0 → 100755
shell_debug/method_count.hql
0 → 100755
-
Please register or sign in to post a comment