编译oozie4.2.0遇到问题
版本说明:
jdk: 1.7
maven: 3.0.3
hadoop: 2.7.1
hive: 2.0.0
pig: 0.13
1. 在编译的时候遇到
ShimLoader.getHadoopShims().setTokenStr(ugi, delegationToken,hiveConf.get("hive.metastore.token.signature"));
这行报错,找不到方法。
原因:是因为高版本hive-exec已经没有该方法了,但是4.2.0release版本没有解决该问题,github上版本已解决,
将该部分代码替换为:
Token<DelegationTokenIdentifier> token = new Token<DelegationTokenIdentifier>();
token.decodeFromUrlString(delegationToken);
token.setService(new Text(hiveConf.get("hive.metastore.token.signature")));
ugi.addToken(token);
问题解决
2. 使用hive2.0.0
需要提高jline版本,否则运行hive任务可能报错
<dependency>
<groupId>jline</groupId>
<artifactId>jline</artifactId>
<version>2.12</version> <!--默认是0.9.94-->
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>