0
votes

I'm totally new to oozie and I'm creating a workflow to run a hive query for simply displaying a table's data from hive using select statement but once i submitting the job its giving the below error.

JA017: Unknown hadoop job [job_local1866275230_0001] associated with action [0000000-150519212325700-oozie-oozi-W@adstest]. Failing this action!

Below is my hive-site.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<configuration>
  <property>
    <name>javax.jdo.option.ConnectionURL</name>
    <value>jdbc:mysql://localhost:3306/metastore</value>
  </property>
  <property>
    <name>javax.jdo.option.ConnectionDriverName</name>
    <value>com.mysql.jdbc.Driver</value>
  </property>
  <property>
    <name>javax.jdo.option.ConnectionUserName</name>
    <value>hiveuser</value>
  </property>
  <property>
    <name>javax.jdo.option.ConnectionPassword</name>
    <value>password</value>
  </property>
  <property>
    <name>datanucleus.autoCreateSchema</name>
    <value>false</value>
  </property>
  <property>
    <name>datanucleus.fixedDatastore</name>
    <value>true</value>
  </property>
  <property>
    <name>datanucleus.autoStartMechanism</name>
    <value>SchemaTable</value>
  </property>
  <property>
    <name>hive.metastore.uris</name>
    <value>thrift://localhost.localdomain:9083</value>
  </property>
  <property>
    <name>hive.support.concurrency</name>
    <value>true</value>
  </property>
  <property>
    <name>hive.zookeeper.quorum</name>
    <value>localhost</value>
  </property>

  <!-- workaround for https://issues.cloudera.org/browse/IMPALA-1416 -->
  <property>
    <name>hive.metastore.try.direct.sql</name>
    <value>false</value>
  </property>
  <property>
    <name>hive.metastore.try.direct.sql.ddl</name>
    <value>false</value>
  </property>

Below is the workflow.xml

<workflow-app name="adstest" xmlns="uri:oozie:workflow:0.4">
    <start to="adstest"/>
    <action name="adstest">
        <hive xmlns="uri:oozie:hive-action:0.2">
            <job-tracker>${jobTracker}</job-tracker>
            <name-node>${nameNode}</name-node>
              <job-xml>hive-conf.xml</job-xml>
            <script>adstest.hql</script>
            <file>hive-conf.xml#hive-conf.xml</file>
        </hive>
        <ok to="end"/>
        <error to="kill"/>
    </action>
    <kill name="kill">
        <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
    </kill>
    <end name="end"/>
</workflow-app>

I didn't selected any parameter as its just a simple select query for displaying first 20 results from the table.

Let me know if if i have to make any chages in any conf file.

1

1 Answers

1
votes

When an Oozie workflow is executed, Oozie checks the status of job and while the job is running Oozie will report the status as running, however after the job completes, it queries the data from history server and if the job id is not find at history server, Oozie fails to get the status and marks the status of the workflow as failed.

However, the workflow may have finished successfully and the output will be available. Resource Manager will also report the status of the application executed as FINISHED / SUCCEEDED.

  1. Ensure that the below 2 parameters are same across all the nodes:

    mapreduce.jobhistory.intermediate-done-dir

    mapreduce.jobhistory.done-dir

  2. Restart YARN services and History Server. Please refer this link for more details. https://support.pivotal.io/hc/en-us/articles/202530283-Oozie-logs-report-Unknown-hadoop-job-and-history-server-UI-not-populated