搭建hive的eclispe调试环境(ubuntu)

svn check out hive 工程
图1
将相关java build path,保证能编译通过,没有红色xx
build.xml--》run as--》Ant build,successful后,将build/目录下所有jar包拷贝至lib/文件夹下。
若ant没有安装或者不想通过ant编译,可以在apache上下载已经编译好的hive工程,将所有jar包拷贝至lib下,注意,hadoop jar与集群hadoop版本一致。
将lib/*.jar build path。
选择org.apache.hadoop.hive.cli.CliDriver,右键Debug As--》Debug Configuration
图2
ubuntu环境下run时,ConsoleReader reader = new ConsoleReader();语句eclipse会死掉,需要在VM arguments中添加参数:
-Djline.terminal=jline.UnsupportedTerminal
图3
将hive的conf及hadoop conf配置,加载进classpath(advanced–>add external folder-->选择hive/hadoop conf文件)
图4
save run。
图5
若抛出 org.datanucleus.jdo.exceptions.ClassNotPersistenceCapableException: The class "org.apache.hadoop.hive.metastore.model.MDatabase" is not persistable. This means that it either hasnt been enhanced, or that the enhanced version of the file is not in the CLASSPATH (or is hidden by an unenhanced version),or the Meta-Data/annotations for the class are not found.异常参考:
http://www.datanucleus.org/products/accessplatform/guides/eclipse/index.html
http://guoyunsky.iteye.com/blog/1178076
解决。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值