oozie调用hive执行hql时的error
java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: file:./tmp/yarn/32f78598-6ef2-444b-b9b2-c4bbfb317038/hive_2016-07-07_00-46-43_542_5546892249492886535-1
https://issues.apache.org/jira/browse/OOZIE-2380
4.1.0版本解决
修改org.apache.oozie.action.hadoop.JavaActionExecutor
位置:core\src\main\java\org\apache\oozie\action\hadoop\JavaActionExecutor
1、加入此方法
加入全局变量
public static final String HADOOP_REDUCE_JAVA_OPTS = "mapreduce.reduce.java.opts";
private static final String JAVA_TMP_DIR_SETTINGS = "-Djava.io.tmpdir=";
2、在该类中调用此方法
3、修改org.apache.oozie.action.hadoop.HiveMain
位置:sharelib\hive\src\main\java\org\apache\oozie\action\hadoop\HiveMain
4、用maven打包编译, mvn clean package -DskipTests
5、替换对应的包的class文件
oozie-core-4.1.0-cdh5.5.0.jar 更新
/opt/cloudera/parcels/CDH-5.5.0-1.cdh5.5.0.p0.8/jars
oozie-sharelib-hive-4.1.0-cdh5.5.0.jar 更新
/opt/cloudera/parcels/CDH-5.5.0-1.cdh5.5.0.p0.8/jars
/opt/cloudera/parcels/CDH-5.5.0-1.cdh5.5.0.p0.8/lib/oozie/oozie-sharelib-yarn/lib/hive
/opt/cloudera/parcels/CDH-5.5.0-1.cdh5.5.0.p0.8/lib/oozie/libserver
6、修改oozie的hdfs的sharelib目录下的文件
hdfs://xxd-hdfs-ha/user/oozie/share/lib/lib_20160706183059/hive/oozie-sharelib-hive-4.1.0-cdh5.5.0.jar
hdfs://xxd-hdfs-ha/user/oozie/share/lib/lib_20160706183059/hive/oozie-sharelib-hive.jar
这两个jar都是对应的oozie-sharelib-hive-4.1.0-cdh5.5.0.jar包,只是名不同。