workflow.xml的配置如下:
[mw_shl_code=xml,true]<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()}/${outputDir}/*"/>
</prepare>
<job-xml>conf/hive-site.xml</job-xml>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>default</value>
</property>
<property>
<name>hive.metastore.uris</name>
<value>thrift://datanode5:9083</value>
</property>
</configuration>
<script>script.hql</script>
<param>OUTPUT=/user/${wf:user()}/${outputDir}</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>[/mw_shl_code]
运行hive的create语句是能够成功执行
但是运行select语句是在oozie web端就报 [org.apache.oozie.action.hadoop.HiveMain], exit code [40000]]的错误
hadoop日志:
2015-06-10 15:49:14,091 INFO [main]: ql.Driver (Driver.java:execute(1317)) - Starting command: select t.a,t.b from test.timetest t
2015-06-10 15:49:14,092 INFO [main]: log.PerfLogger (PerfLogger.java:PerfLogEnd(148)) - </PERFLOG method=TimeToSubmit start=1433922552937 end=1433922554092 duration=1155 from=org.apache.hadoop.hive.ql.Driver>
2015-06-10 15:49:14,092 INFO [main]: log.PerfLogger (PerfLogger.java:PerfLogBegin(121)) - <PERFLOG method=runTasks from=org.apache.hadoop.hive.ql.Driver>
2015-06-10 15:49:14,092 INFO [main]: log.PerfLogger (PerfLogger.java:PerfLogEnd(148)) - </PERFLOG method=runTasks start=1433922554092 end=1433922554092 duration=0 from=org.apache.hadoop.hive.ql.Driver>
2015-06-10 15:49:14,093 INFO [main]: log.PerfLogger (PerfLogger.java:PerfLogEnd(148)) - </PERFLOG method=Driver.execute start=1433922554091 end=1433922554093 duration=2 from=org.apache.hadoop.hive.ql.Driver>
2015-06-10 15:49:14,093 INFO [main]: ql.Driver (SessionState.java:printInfo(852)) - OK
也没问题
script.hql就一行select语句select t.a,t.b from test.timetest t;
这是什么原因呐?
|