日期:2014-05-16 浏览次数:20781 次
2010-05-31 10:50:17|61.132.4.82|http://www.360buy.com/product/201185.html
CREATE TABLE click_test ( time string, ip string, url string) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\|' STORED AS TEXTFILE;
LOAD DATA LOCAL INPATH '/data/clicktest_20110217.txt' OVERWRITE INTO TABLE click_test;
select * from click_test;
127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326
hive> LOAD DATA LOCAL INPATH "./examples/files/apache.access.log" INTO TABLE apachelog; hive> LOAD DATA LOCAL INPATH "./examples/files/apache.access.2.log" INTO TABLE apachelog;
hive> select * from apachelog order by time;
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.contrib.serde2.RegexSerDe at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method)
hive --auxpath ./hive/lib/hive_contrib.jar