2013-03-07 脚本的雏形
来源:互联网 发布:蓝牙模块发送不了数据 编辑:程序博客网 时间:2024/06/01 08:09
将hive cli中测试通过的语句,整理成脚本的形式:
analyzefunc( ){
hive -e "create external table if not exists temp (ip STRING,identd STRING,username STRING,handledate STRING,requrl STRING,status int,returnbytes int,referer string,browser STRING) row format SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe'WITH SERDEPROPERTIES ('serialization.format'='org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol','quote.delim'='("|\\[|\\])','field.delim'=' ') STORED AS TEXTFILE location '/logs/apache/2013-02-25';
create table if not exists result_url(appname string,url string,ip string,count int);
insert into table result_url (select 'appcrm',requrl,mid(handledate,0,14),count(1) from temp group by requrl,mid(handledate,0,14);//ip,
insert into table result_pv (select count(1) from appcrm_temp group by mid(handledate,0,14);"
}
export2mysql( ){
sqoop export --connect jdbc:mysql://localhost/hadoopguide --username root -m 1 --table hdfsfile --export-dir output/part-r-00000 --input-fields-terminated-by '\t';
}
现在看来觉得真是太雏形了。。。
- 2013-03-07 脚本的雏形
- 魔兽自动开始脚本雏形
- 通用的DAO雏形
- 人工智能推导的雏形
- 我们的需求雏形
- 浏览器的雏形
- 框架思维的雏形
- 分数类的雏形
- 分数类的雏形
- 分数类的雏形
- 分数类的雏形
- 分数类的雏形
- 分数类的雏形
- 分数类的雏形
- 分数类的雏形
- 分数类的雏形
- 分数类的雏形
- 分数类的雏形
- HTML 学习笔记(二)frameset、frame、iframe、#……id、.……class、<link rel=……、url("……")
- 文件安全与权限
- 做网站这条路能走多远
- ios截图
- USB学习
- 2013-03-07 脚本的雏形
- RFC2326 - Real Time Streaming Protocol (RTSP) 完整中英文对照版
- 查看Oracle数据库表空间大小
- android中自定义VideoView
- GIT基本概念和用法总结
- 7中字符串反转方法
- Debian6+KDE4安装总结
- 2013-03-11
- Delphi RTTI(运行时类型信息)