2012-01-17 00:14:19,314 org.apache.hadoop.util.NativeCodeLoader -13 [main] INFO org.apache.hadoop.util.NativeCodeLoader
2012-01-17 00:14:19,316 org.apache.hadoop.io.compress.zlib.ZlibFactory -15 [main] INFO org.apache.hadoop.io.compress.zlib.ZlibFactory
NULL NULL
Time taken: 21.28 seconds
hive>
参考:
Jasper Knulst 13020438802011年04月06日 星期三 06时51分20秒
Link Here
Print view
Hi(ve),
I created a table like this;
create table testtable (veld1 STRING,veld2 STRING,veld3 STRING) ROW FORMAT
SERDE 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'
> WITH SERDEPROPERTIES ("input.regex" =
"([a-z]{4}[0-9])þ([a-z]{4}[0-9])þ([a-z]{4}[0-9])") STORED AS TEXTFILE;
The table is OK, select * from testtable shows the contents of the
underlying HDFS file.
However when I invoke a MR job by select veld2 from testtable, the MR job
starts but I get mapper errors saying:
"Caused by: org.apache.hadoop.hive.ql.metadata.HiveException:
java.lang.ClassNotFoundException:
org.apache.hadoop.hive.contrib.serde2.RegexSerDe"
I already copied the hive serde jar (in my case hive-serde-0.7.0-CDH3B4.jar)
to $HADOOP_HOME/lib and restarted jobtracker/tasktrackers but that doesn't
help.
Cheers JasperShow footer--
Kind Regards \ Met Vriendelijke Groet,
Jasper Knulst
BI Consultant
VLC Den Haag
Gildeweg 5B
2632 BD Nootdorp
M: +31 (0)6 19 66 75 11
T: +31 (0)15 764 07 50
Loren Siebert 13020443192011年04月06日 星期三 06时58分39秒
Link Here
Print view
You need to tell Hive about the JAR. This is how I do it in hive-site.xml:
<property>
<name>hive.aux.jars.path</name>
<value>file:///usr/lib/hive/lib/hive-contrib-0.7.0-CDH3B4.jar</value>
<description>These JAR file are available to all users for all jobs</description>
</property>Show quoted text