问题描述:
在用oozie测试调用安装包中自带hive示例时报错:
操作步骤如下:
hadoop 版本为1.0.3、oozie 版本为3.3.0 、hive 版本为0.9.0
hadoop 、hive 、oozie 都以安装好,服务也以全部启动
开始测试oozie 调用hive action
修改oozie 安装包自带的examples 示例中的hive 配置文件
配置信息如下
1.job.properties 文件
这个文件,我只修改了namenode 和jobTracker 属性值
nameNode=hdfs://ha-test-nn:8020
jobTracker=ha-test-jt:54311
queueName=default
examplesRoot=examples
oozie.use.system.libpath=true
oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}/apps/hive
2.webflow.xml 文件
在configuration 属性中添加了oozie.hive.defaults、 hive.metastore.uris、hive.metastore.local、hive.metastore.warehouse.dir、hive.metastore.local几个属性。在网上查的说要添加这个几个属性,这个几个属性我都是hive 的 hive-site.xml文件中复制过来的。
<workflow-app xmlns="uri:oozie:workflow:0.2" name="hive-wf">
<start to="hive-node"/>
<action name="hive-node">
<hive xmlns="uri:oozie:hive-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<prepare>
<delete path="${nameNode}/user/${wf:user()}/${examplesRoot}/output-data/hive"/>
<mkdir path="${nameNode}/user/${wf:user()}/${examplesRoot}/output-data"/>
</prepare>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
<property>
<name>oozie.hive.defaults</name>
<value>hive-site.xml</value>
</property>
<property>
<name>hive.metastore.uris</name>
<value>thrift://ha-test-nn:9083</value>
</property>
<property>
<name>hive.metastore.local</name>
<value>false</value>
</property>
<property>
<name>hive.metastore.warehouse.dir</name>
<value>/user/hive/warehouse</value>
</property>
<property>
<name>hive.metastore.local</name>
<value>false</value>
</property>
</configuration>
<script>script.q</script>
<param>INPUT=/user/${wf:user()}/${examplesRoot}/input-data/table</param>
<param>OUTPUT=/user/${wf:user()}/${examplesRoot}/output-data/hive</param>
</hive>
<ok to="end"/>
<error to="fail"/>
</action>
<kill name="fail">
<message>Hive failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>
3.script.q 文件
这个文件内容没改
CREATE EXTERNAL TABLE test_liuz (a INT) STORED AS TEXTFILE LOCATION '${INPUT}';
INSERT OVERWRITE DIRECTORY '${OUTPUT}' SELECT * FROM test_liuz;
4.将hive 安装目录下hive-site.xml 直接拿过来的放在 和workflow.xml 文件相同的目录
网上说要oozie 掉hive 要指定hive-site.xml ,索性直接把文件拿过来。。。。
5.接着开始测试
将examples 整个目录上传hdfs 上
我这边上传的目录为 hadoop fd -copyFromLocal home/hddtmn/liuz/examples /user/hddtmn/examples
执行提交oozie job
bin/oozie job -oozie http://localhost://11000/oozie -config /home/hddtmn/liuz/examples/app/hive/job.properties -run
提交后发现失败了,info 和 log信息如下
hddtmn@bB0203007:~> /usr/lib/oozie/bin/oozie job -oozie http://localhost:11000/oozie -info 0000020-140401110935084-oozie-oozi-W
Job ID : 0000020-140401110935084-oozie-oozi-W
------------------------------------------------------------------------------------------------------------------------------------
Workflow Name : hive-wf
App Path : hdfs://ha-test-nn:8020/user/hddtmn/examples/apps/hive
Status : KILLED
Run : 0
User : hddtmn
Group : -
Created : 2014-05-14 06:03 GMT
Started : 2014-05-14 06:03 GMT
Last Modified : 2014-05-14 06:03 GMT
Ended : 2014-05-14 06:03 GMT
CoordAction ID: -
Actions
------------------------------------------------------------------------------------------------------------------------------------
ID Status Ext ID Ext Status Err Code
------------------------------------------------------------------------------------------------------------------------------------
0000020-140401110935084-oozie-oozi-W@:start: OK - OK -
------------------------------------------------------------------------------------------------------------------------------------
0000020-140401110935084-oozie-oozi-W@hive-node ERROR job_201404020957_0114 FAILED/KILLED9
------------------------------------------------------------------------------------------------------------------------------------
0000020-140401110935084-oozie-oozi-W@fail OK - OK E0729
------------------------------------------------------------------------------------------------------------------------------------
hddtmn@bB0203007:~> /usr/lib/oozie/bin/oozie job -oozie http://localhost:11000/oozie -log 0000020-140401110935084-oozie-oozi-W
2014-05-14 14:03:08,675 INFO ActionStartXCommand:539 - USER[hddtmn] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000020-140401110935084-oozie-oozi-W] ACTION[0000020-140401110935084-oozie-oozi-W@:start:] Start action [0000020-140401110935084-oozie-oozi-W@:start:] with user-retry state : userRetryCount [0], userRetryMax [0], userRetryInterval [10]
2014-05-14 14:03:08,676 WARN ActionStartXCommand:542 - USER[hddtmn] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000020-140401110935084-oozie-oozi-W] ACTION[0000020-140401110935084-oozie-oozi-W@:start:] [***0000020-140401110935084-oozie-oozi-W@:start:***]Action status=DONE
2014-05-14 14:03:08,676 WARN ActionStartXCommand:542 - USER[hddtmn] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000020-140401110935084-oozie-oozi-W] ACTION[0000020-140401110935084-oozie-oozi-W@:start:] [***0000020-140401110935084-oozie-oozi-W@:start:***]Action updated in DB!
2014-05-14 14:03:08,745 INFO ActionStartXCommand:539 - USER[hddtmn] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000020-140401110935084-oozie-oozi-W] ACTION[0000020-140401110935084-oozie-oozi-W@hive-node] Start action [0000020-140401110935084-oozie-oozi-W@hive-node] with user-retry state : userRetryCount [0], userRetryMax [0], userRetryInterval [10]
2014-05-14 14:03:10,080 WARN HiveActionExecutor:542 - USER[hddtmn] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000020-140401110935084-oozie-oozi-W] ACTION[0000020-140401110935084-oozie-oozi-W@hive-node] credentials is null for the action
2014-05-14 14:03:19,098 INFO HiveActionExecutor:539 - USER[hddtmn] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000020-140401110935084-oozie-oozi-W] ACTION[0000020-140401110935084-oozie-oozi-W@hive-node] checking action, external ID [job_201404020957_0114] status [RUNNING]
2014-05-14 14:03:19,100 WARN ActionStartXCommand:542 - USER[hddtmn] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000020-140401110935084-oozie-oozi-W] ACTION[0000020-140401110935084-oozie-oozi-W@hive-node] [***0000020-140401110935084-oozie-oozi-W@hive-node***]Action status=RUNNING
2014-05-14 14:03:19,101 WARN ActionStartXCommand:542 - USER[hddtmn] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000020-140401110935084-oozie-oozi-W] ACTION[0000020-140401110935084-oozie-oozi-W@hive-node] [***0000020-140401110935084-oozie-oozi-W@hive-node***]Action updated in DB!
2014-05-14 14:03:34,355 INFO CallbackServlet:539 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000020-140401110935084-oozie-oozi-W] ACTION[0000020-140401110935084-oozie-oozi-W@hive-node] callback for action [0000020-140401110935084-oozie-oozi-W@hive-node]
2014-05-14 14:03:34,418 INFO HiveActionExecutor:539 - USER[hddtmn] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000020-140401110935084-oozie-oozi-W] ACTION[0000020-140401110935084-oozie-oozi-W@hive-node] action completed, external ID [job_201404020957_0114]
2014-05-14 14:03:34,448 WARN HiveActionExecutor:542 - USER[hddtmn] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000020-140401110935084-oozie-oozi-W] ACTION[0000020-140401110935084-oozie-oozi-W@hive-node] Launcher ERROR, reason: Main class [org.apache.oozie.action.hadoop.HiveMain], exit code [9]
2014-05-14 14:03:34,537 INFO ActionEndXCommand:539 - USER[hddtmn] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000020-140401110935084-oozie-oozi-W] ACTION[0000020-140401110935084-oozie-oozi-W@hive-node] ERROR is considered as FAILED for SLA
2014-05-14 14:03:34,585 INFO ActionStartXCommand:539 - USER[hddtmn] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000020-140401110935084-oozie-oozi-W] ACTION[0000020-140401110935084-oozie-oozi-W@fail] Start action [0000020-140401110935084-oozie-oozi-W@fail] with user-retry state : userRetryCount [0], userRetryMax [0], userRetryInterval [10]
2014-05-14 14:03:34,585 WARN ActionStartXCommand:542 - USER[hddtmn] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000020-140401110935084-oozie-oozi-W] ACTION[0000020-140401110935084-oozie-oozi-W@fail] [***0000020-140401110935084-oozie-oozi-W@fail***]Action status=DONE
2014-05-14 14:03:34,585 WARN ActionStartXCommand:542 - USER[hddtmn] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000020-140401110935084-oozie-oozi-W] ACTION[0000020-140401110935084-oozie-oozi-W@fail] [***0000020-140401110935084-oozie-oozi-W@fail***]Action updated in DB!
2014-05-14 14:03:34,646 WARN CoordActionUpdateXCommand:542 - USER[hddtmn] GROUP[-] TOKEN[] APP[hive-wf] JOB[0000020-140401110935084-oozie-oozi-W] ACTION[-] E1100: Command precondition does not hold before execution, [, coord action is null], Error Code: E1100
log 其中有一行信息 Launcher ERROR, reason: Main class [org.apache.oozie.action.hadoop.HiveMain], exit code [9],这个地方有错误?
折腾了N久,未解决,求大神指导啊
|
|