hive1.2.1源码导入eclipse

查看数: 12868 | 评论数: 5 | 收藏 1
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2016-5-9 14:14

正文摘要:

问题导读: 1.如何配置 local_reposity ? 2.如何进行编译? 3.如何使用? 软件版本: hive1.2.1 ,eclipse4.5,maven3.2 ,JDK1.7 软件准备: hive: 4. 总结 ...

回复

xingoo 发表于 2016-8-30 16:32:01
desehawk 发表于 2016-8-30 16:14
最好不用derby,经常出问题
推荐参考
hive使用derby作为元数据库找不到所创建表的原因

hive第一次执行的时候都会报这个错吧!然后运行完schema脚本以后就没有问题了....
我是直接在eclipse通过CliDriver().run()的方式启动的,想问一下有没有办法初始化一下derby数据库。
desehawk 发表于 2016-8-30 16:14:26
xingoo 发表于 2016-8-30 15:21
我使用的是第三种方法,但是总是报metastore问题。我想用本地的derby,该怎么启动./schematool -initSchema ...

最好不用derby,经常出问题
推荐参考
hive使用derby作为元数据库找不到所创建表的原因
http://www.aboutyun.com/forum.php?mod=viewthread&tid=7803


xingoo 发表于 2016-8-30 15:21:12
我使用的是第三种方法,但是总是报metastore问题。我想用本地的derby,该怎么启动./schematool -initSchema -dbType derby 命令
[mw_shl_code=applescript,true]Exception in thread "main" java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to auto-create the underlying database in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for mysql))
        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:578)
        at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:518)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:705)
        at MainTest.main(MainTest.java:5)
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to auto-create the underlying database in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for mysql))
        at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:226)
        at org.apache.hadoop.hive.ql.metadata.Hive.<init>(Hive.java:366)
        at org.apache.hadoop.hive.ql.metadata.Hive.create(Hive.java:310)
        at org.apache.hadoop.hive.ql.metadata.Hive.getInternal(Hive.java:290)
        at org.apache.hadoop.hive.ql.metadata.Hive.get(Hive.java:266)
        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:545)
        ... 3 more
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to auto-create the underlying database in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for mysql))
        at org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:3593)
        at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:236)
        at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:221)
        ... 8 more
Caused by: MetaException(message:Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to auto-create the underlying database in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for mysql))
        at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3364)
        at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3336)
        at org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:3590)
        ... 10 more[/mw_shl_code]
xuliang123789 发表于 2016-5-10 08:59:48
谢谢楼主,学习一下,赞~~
xw2016 发表于 2016-5-9 23:24:19
好长啊
关闭

推荐上一条 /2 下一条