mysql5资源共享

 找回密码
 立即注册
查看: 35|回复: 1

[其他数据库] 【数据仓库】有没有HIVE熟悉的高手帮看下错误出在那里了?

[复制链接]

1

主题

1

帖子

5

积分

新手上路

Rank: 1

积分
5
发表于 2019-7-14 02:14:03 | 显示全部楼层 |阅读模式
错误如下
Exceptioninthread"main"java.lang.RuntimeException:java.lang.RuntimeException:Unabletoinstantiateorg.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
atorg.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:522)
atorg.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:677)
atorg.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)
atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
atjava.lang.reflect.Method.invoke(Method.java:498)
atorg.apache.hadoop.util.RunJar.run(RunJar.java:221)
atorg.apache.hadoop.util.RunJar.main(RunJar.java:136)
Causedby:java.lang.RuntimeException:Unabletoinstantiateorg.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
atorg.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1523)
atorg.apache.hadoop.hive.metastore.RetryingMetaStoreClient.(RetryingMetaStoreClient.java:86)
atorg.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:132)
atorg.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:104)
atorg.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3005)
atorg.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3024)
atorg.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:503)
...8more
Causedby:java.lang.reflect.InvocationTargetException
atsun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeMethod)
atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
atjava.lang.reflect.Constructor.newInstance(Constructor.java:423)
atorg.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1521)
...14more
Causedby:java.lang.IllegalArgumentException:java.net.URISyntaxException:RelativepathinabsoluteURI:hdfs://mycluster./~/apps/hive/warehouse
atorg.apache.hadoop.fs.Path.initialize(Path.java:205)
atorg.apache.hadoop.fs.Path.(Path.java:196)
atorg.apache.hadoop.hive.metastore.Warehouse.getDnsPath(Warehouse.java:141)
atorg.apache.hadoop.hive.metastore.Warehouse.getDnsPath(Warehouse.java:146)
atorg.apache.hadoop.hive.metastore.Warehouse.getWhRoot(Warehouse.java:159)
atorg.apache.hadoop.hive.metastore.Warehouse.getDefaultDatabasePath(Warehouse.java:177)
atorg.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB_core(HiveMetaStore.java:600)
atorg.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:620)
atorg.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:461)
atorg.apache.hadoop.hive.metastore.RetryingHMSHandler.(RetryingHMSHandler.java:66)
atorg.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:72)
atorg.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:5762)
atorg.apache.hadoop.hive.metastore.HiveMetaStoreClient.(HiveMetaStoreClient.java:199)
atorg.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.(SessionHiveMetaStoreClient.java:74)
...19more
Causedby:java.net.URISyntaxException:RelativepathinabsoluteURI:hdfs://mycluster./~/apps/hive/warehouse
atjava.net.URI.checkPath(URI.java:1823)
atjava.net.URI.(URI.java:745)
atorg.apache.hadoop.fs.Path.initialize(Path.java:202)
...32more





网上百度后说我要么hadoop没开,要么缺jar包
但我的hadoop已经开了啊,jar包也导进去了,版本也对

49357.jpg

49357.jpg


49358.jpg

49358.jpg




还有说mysql没开的,可我开了啊

49359.jpg

49359.jpg


我也不知道问题出在那里了


可以知道的是hdfs集群和Hbase是好使的,出现问题的时间点是在我安完Hive后,想把mysql作为关系型数据库插入,改完配置文件后出现的

以下为配置信息

hive-env.sh

exportHADOOP_HOME=/home/hyxy/apps/hadoop

这是hive-env.sh文件里我唯一添加的东西

hive-site.xml


       
       

                hive.exec.scratchdir
                /tmp/hive


       
                hive.exec.local.scratchdir
                /home/hyxy/apps/hive
       

       
                javax.jdo.option.ConnectionUserName
                hyxyhive1
       
       
                javax.jdo.option.ConnectionPassword
                123456
       

       
                javax.jdo.option.ConnectionURL
                jdbc:mysql://master:3306/hive?createDatabaseIfNotExist=true
       

       
                javax.jdo.option.ConnectionDriverName
                com.mysql.jdbc.Driver
       
       
       
                hive.metastore.warehouse.dir
                ~/apps/hive/warehouse
       



同时也参照官网创建了2个目录,并各自赋予权限

$>hadoopfs-mkdir/tmp
$>hadoopfs-mkdir-p/user/hive/warehouse
$>hadoopfs-chmodg+w/tmp
$>hadoopfs-chmodg+w/user/hive/warehouse


我不知道问题出在了那里,希望各位可以帮我下,感谢
回复

使用道具 举报

0

主题

1

帖子

4

积分

新手上路

Rank: 1

积分
4
发表于 2019-7-15 10:45:42 | 显示全部楼层
你把hadoop下的share/hadoop/yarn/lib下的zookeeper-3.8.1.jar复制到hive/lib下
这是两个包不匹配的问题,你试试
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|mysql5.com Inc. ( 闽ICP备17002856号-1 )

GMT+8, 2019-10-22 07:24 , Processed in 0.049549 second(s), 21 queries .

Powered by MySQL5.com X3.4

© 2003-2019 MySQL5.com.

快速回复 返回顶部 返回列表