#/usr/local/apache-hive-0.13.0-bin/bin/hive -e "select count(distinct ip) from bbs where logdate = $CURRENT"
#/usr/local/apache-hive-0.13.0-bin/bin/hive -e "select count(*) from bbs where logdate = $CURRENT and instr(url, 'member.phpmod=register')>0;"
#/usr/local/apache-hive-0.13.0-bin/bin/hive -e "create table vip_$CURRENT row format delimited fields terminated by '\t' as select ip, count(*) as vtimes from bbs where logdate = $CURRENT group by ip having vtimes >= 50 order by vtimes desc limit 20"
数据导出到关系型数据句酷
/usr/local/sqoop-1.4.4/bin/sqoop export --connect jdbc:mysql://192.168.1.100:3306/usertable--username root --password 123 --export-dir "/user/hive/warehouse/vip_$CURRENT" --table vip --fields-terminated-by '\t'