commit
Showing
3 changed files
with
19 additions
and
0 deletions
| ... | @@ -11,6 +11,7 @@ hive -f ./shell_debug/load_data.hql | ... | @@ -11,6 +11,7 @@ hive -f ./shell_debug/load_data.hql |
| 11 | $(hive -hivevar myTimestamp=$maxTimestamp -f ./shell_debug/method_count.hql) | 11 | $(hive -hivevar myTimestamp=$maxTimestamp -f ./shell_debug/method_count.hql) |
| 12 | $(hive -hivevar myTimestamp=$maxTimestamp -f ./shell_debug/biz_data_count.hql) | 12 | $(hive -hivevar myTimestamp=$maxTimestamp -f ./shell_debug/biz_data_count.hql) |
| 13 | $(hive -hivevar myTimestamp=$maxTimestamp -f ./shell_debug/biz_data_response.hql) | 13 | $(hive -hivevar myTimestamp=$maxTimestamp -f ./shell_debug/biz_data_response.hql) |
| 14 | $(hive -hivevar myTimestamp=$maxTimestamp -f ./shell_debug/huo_dong_ru_kou.hql) | ||
| 14 | 15 | ||
| 15 | hadoop fs -rm /input/debug/data/app.out | 16 | hadoop fs -rm /input/debug/data/app.out |
| 16 | 17 | ||
| ... | @@ -19,3 +20,5 @@ sleep 3 | ... | @@ -19,3 +20,5 @@ sleep 3 |
| 19 | 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' | 20 | 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' |
| 20 | sleep 3 | 21 | sleep 3 |
| 21 | 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' | 22 | 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' |
| 23 | sleep 3 | ||
| 24 | 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' | ... | ... |
| ... | @@ -35,4 +35,12 @@ biz_data string, | ... | @@ -35,4 +35,12 @@ biz_data string, |
| 35 | uid string, | 35 | uid string, |
| 36 | timestamp string, | 36 | timestamp string, |
| 37 | response string | 37 | response string |
| 38 | ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; | ||
| 39 | |||
| 40 | CREATE TABLE huo_dong_ru_kou_debug( | ||
| 41 | method string, | ||
| 42 | biz_data string, | ||
| 43 | uid string, | ||
| 44 | timestamp string, | ||
| 45 | response string | ||
| 38 | ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; | 46 | ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
shell_debug/huo_dong_ru_kou.hql
0 → 100755
| 1 | use testdb; | ||
| 2 | |||
| 3 | INSERT OVERWRITE TABLE huo_dong_ru_kou_debug | ||
| 4 | select method,biz_data,uid,timestamp,response | ||
| 5 | from qa_log_debug | ||
| 6 | where method is not null and method!='N/A' | ||
| 7 | and (method='com.lejane.handler.common.sidebar.operate.query.new.v3' or method='com.lejane.handler.common.sidebar.operate.query.list') | ||
| 8 | and timestamp>'${hivevar:myTimestamp}'; | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or sign in to post a comment