Commit fc911e7d fc911e7daaf8d75c4e9411fbe8f938cadd6245a1 by zhanghao

commit

1 parent 58b1f066
...@@ -12,6 +12,7 @@ hive -f ./shell/load_data.hql ...@@ -12,6 +12,7 @@ hive -f ./shell/load_data.hql
12 hive -f ./shell/method_count.hql 12 hive -f ./shell/method_count.hql
13 hive -f ./shell/biz_data_count.hql 13 hive -f ./shell/biz_data_count.hql
14 hive -f ./shell/biz_data_response.hql 14 hive -f ./shell/biz_data_response.hql
15 hive -f ./shell/tc_response.hql
15 16
16 hadoop fs -rm /input/data/$time 17 hadoop fs -rm /input/data/$time
17 rm ../$time 18 rm ../$time
...@@ -21,3 +22,5 @@ sleep 3 ...@@ -21,3 +22,5 @@ sleep 3
21 sqoop export --connect "jdbc:mysql://127.0.0.1:3306/bigdata" --username root --password zidonghua --table biz_data_count --export-dir /user/hive/warehouse/testdb.db/biz_data_count --input-fields-terminated-by '\t' 22 sqoop export --connect "jdbc:mysql://127.0.0.1:3306/bigdata" --username root --password zidonghua --table biz_data_count --export-dir /user/hive/warehouse/testdb.db/biz_data_count --input-fields-terminated-by '\t'
22 sleep 3 23 sleep 3
23 sqoop export --connect "jdbc:mysql://127.0.0.1:3306/bigdata" --username root --password zidonghua --table biz_data_response --export-dir /user/hive/warehouse/testdb.db/biz_data_response --input-fields-terminated-by '\t' 24 sqoop export --connect "jdbc:mysql://127.0.0.1:3306/bigdata" --username root --password zidonghua --table biz_data_response --export-dir /user/hive/warehouse/testdb.db/biz_data_response --input-fields-terminated-by '\t'
25 sleep 3
26 sqoop export --connect "jdbc:mysql://127.0.0.1:3306/bigdata" --username root --password zidonghua --table tc_response --export-dir /user/hive/warehouse/testdb.db/tc_response --input-fields-terminated-by '\t'
......
...@@ -36,3 +36,11 @@ uid string, ...@@ -36,3 +36,11 @@ uid string,
36 timestamp string, 36 timestamp string,
37 response string 37 response string
38 ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; 38 ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t';
39
40 CREATE TABLE tc_response(
41 method string,
42 biz_data string,
43 uid string,
44 timestamp string,
45 response string
46 ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t';
...\ No newline at end of file ...\ No newline at end of file
......
1 use testdb;
2
3 INSERT OVERWRITE TABLE tc_response
4 select method,biz_data,uid,timestamp,response
5 from qa_log
6 where method is not null and method!='N/A'
7 and (method='com.lejane.handler.common.sidebar.operate.query.new.v3'
8 or method='com.lejane.handler.common.sidebar.operate.query.list');
...\ No newline at end of file ...\ No newline at end of file