hive查询mysql元数据的时候出现需要手动导jar包到hdfs上
热度 1已有 826 次阅读2014-6-4 14:22
|
环境:
hive-0.10.0-cdh4.5.0 ,hadoop-2.0-4.5,
在查询hive 的数据时候出现找不到hdfs上的jar包需要手动导入:
select count(1) from weibo-qq
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
java.io.FileNotFoundException: File does not exist: hdfs://localhost:9000/home/hadoop/hive-0.10.0-cdh4.5.0/lib/hive-builtins-0.10.0-cdh4.5.0.jar
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
java.io.FileNotFoundException: File does not exist: hdfs://localhost:9000/home/hadoop/hive-0.10.0-cdh4.5.0/auxlib/zookeeper-3.4.5-cdh4.5.0.jar
at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:824)
解决办法:把hive/lib下面对应的jar上传到HDFS上面对应的目录即可。
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Job running in-process (local Hadoop)
2014-06-04 14:14:01,303 null map = 100%, reduce = 100%
Ended Job = job_local357278961_0001
Execution completed successfully
Mapred Local Task Succeeded . Convert the Join into MapJoin
OK
7
我的hive-site.xml配置:
hive.metastore.local
true
controls whether to connect to remove metastore server or open a new metastore server in Hive Client JVM
javax.jdo.option.ConnectionURL
jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true
JDBC connect string for a JDBC metastore
javax.jdo.option.ConnectionDriverName
com.mysql.jdbc.Driver
Driver class name for a JDBC metastore
javax.jdo.option.ConnectionUserName
username to use against metastore database
javax.jdo.option.ConnectionPassword
password to use against metastore database
我有一点不明白为什么会出现这个问题。