commit
Showing
3 changed files
with
6 additions
and
11 deletions
| ... | @@ -10,13 +10,8 @@ sleep 3 | ... | @@ -10,13 +10,8 @@ sleep 3 |
| 10 | 10 | ||
| 11 | hive -f ./shell/load_data.hql | 11 | hive -f ./shell/load_data.hql |
| 12 | hive -f ./shell/method_count.hql | 12 | hive -f ./shell/method_count.hql |
| 13 | 13 | hive -f ./shell/biz_data_count.hql | |
| 14 | method=$(hive -f ./shell/method_select.hql) | 14 | hive -f ./shell/biz_data_response.hql |
| 15 | for tmp in $method | ||
| 16 | do | ||
| 17 | hive -hivevar mytemp=$tmp -f ./shell/biz_data_count.hql | ||
| 18 | hive -hivevar mytemp=$tmp -f ./shell/biz_data_response.hql | ||
| 19 | done | ||
| 20 | 15 | ||
| 21 | hadoop fs -rm /input/data/$time | 16 | hadoop fs -rm /input/data/$time |
| 22 | rm ../$time | 17 | rm ../$time | ... | ... |
| 1 | use testdb; | 1 | use testdb; |
| 2 | 2 | ||
| 3 | INSERT INTO TABLE biz_data_count | 3 | INSERT OVERWRITE TABLE biz_data_count |
| 4 | select method,biz_data,count(1) as count,max(timestamp) as timestamp | 4 | select method,biz_data,count(1) as count,max(timestamp) as timestamp |
| 5 | from qa_log | 5 | from qa_log |
| 6 | where method is not null and method!='N/A' and method='${hivevar:mytemp}' | 6 | where method is not null and method!='N/A' |
| 7 | group by method,biz_data; | 7 | group by method,biz_data; |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | use testdb; | 1 | use testdb; |
| 2 | 2 | ||
| 3 | INSERT INTO TABLE biz_data_response | 3 | INSERT OVERWRITE TABLE biz_data_response |
| 4 | select method,biz_data,uid,timestamp,response | 4 | select method,biz_data,uid,timestamp,response |
| 5 | from qa_log | 5 | from qa_log |
| 6 | where method is not null and method!='N/A' and method='${hivevar:mytemp}'; | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 6 | where method is not null and method!='N/A'; | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment