run_linux_debug.sh 1.42 KB
#!/bin/bash
hadoop fs -rm /input/debug/data/app.out
hadoop fs -put /home/test/logs/app.out /input/debug/data/app.out
hadoop jar ./target/BrBigDataTest-1.0.0.jar com.bigdata.test.ETLAppDebug /input/debug/data/app.out /input/debug/etl/
sleep 3

hive -f ./shell_debug/max_timestamp.hql
hive -f ./shell_debug/load_data.hql
hive -f ./shell_debug/method_count.hql
hive -f ./shell_debug/biz_data_count.hql
hive -f ./shell_debug/biz_data_response.hql
hive -f ./shell_debug/huo_dong_ru_kou.hql

hadoop fs -rm /input/debug/data/app.out

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'
sleep 3
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'
sleep 3
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'
sleep 3
sqoop export --connect "jdbc:mysql://127.0.0.1:3306/bigdata" --username root --password zidonghua --table huo_dong_ru_kou_debug --export-dir /user/hive/warehouse/testdb.db/huo_dong_ru_kou_debug --input-fields-terminated-by '\t'