Hive脚本/操作工作流失败:Launcher异常:java.lang.RuntimeException

时间:2016-04-22 21:47:13

标签: hadoop oozie oozie-coordinator

我在Cloudera 5.6上并尝试运行简单的Hive脚本工作流程。但我失败了,下面有例外。有什么不对?我将脚本文件和hive-site.xml复制到hdfs文件夹。

这是工作流程定义

<workflow-app name="Add_table_partitions" xmlns="uri:oozie:workflow:0.5">
    <start to="hive-7bc5"/>
    <kill name="Kill">
        <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
    </kill>
    <action name="hive-7bc5" cred="hcat">
        <hive xmlns="uri:oozie:hive-action:0.2">
            <job-tracker>${jobTracker}</job-tracker>
            <name-node>${nameNode}</name-node>
              <job-xml>/user/hive/workflow/hive-site.xml</job-xml>
            <script>/user/hive/workflow/add_partitions.sql</script>
        </hive>
        <ok to="End"/>
        <error to="Kill"/>
    </action>
    <end name="End"/>
</workflow-app>

提前致谢。

2016-04-22 17:25:39,084 WARN org.apache.oozie.action.hadoop.HiveActionExecutor: SERVER[hadoop1.localdomain] USER[admin] GROUP[-] TOKEN[] APP[Add_igortest_tweets_table_partitions] JOB[0000234-160416142003812-oozie-oozi-W] ACTION[0000234-160416142003812-oozie-oozi-W@hive-7bc5] Launcher exception: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
    java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:510)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:671)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:615)
        at org.apache.oozie.action.hadoop.HiveMain.runHive(HiveMain.java:325)
        at org.apache.oozie.action.hadoop.HiveMain.run(HiveMain.java:302)
        at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:49)
        at org.apache.oozie.action.hadoop.HiveMain.main(HiveMain.java:69)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:236)
        at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
        at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
        at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.runSubtask(LocalContainerLauncher.java:388)
        at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.runTask(LocalContainerLauncher.java:302)
        at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler.access$200(LocalContainerLauncher.java:187)
        at org.apache.hadoop.mapred.LocalContainerLauncher$EventHandler$1.run(LocalContainerLauncher.java:230)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
        at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1492)
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:64)
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:74)
        at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2931)
        at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2950)

1 个答案:

答案 0 :(得分:0)

看起来版本与MetaStore和HiveLibraries不匹配

试试这个

http://www.cloudera.com/documentation/cdh/5-0-x/CDH5-Installation-Guide/cdh5ig_hive_schema_tool.html