Christoph Körner created OOZIE-2774:

             Summary: Hive Action with init script (-i filename) argument is 
not working
                 Key: OOZIE-2774
             Project: Oozie
          Issue Type: Bug
          Components: workflow
    Affects Versions: 4.3.0, 4.2.0
         Environment: HDP 2.4, Beeline version 1.2.1000.

            Reporter: Christoph Körner

In hive-cli and beeline one can add the path to init scripts via the 
commandline argument -i. In both tools, this file needs to be available locally 
(not in HDFS). However, using the <argument>-i init.hive</argument> does not 
work even if the file was linked to the local appcache directory via the <file> 

Here is a minimal example (full workflow is available on Github

<action name="test-action">
<hive2 xmlns="uri:oozie:hive2-action:0.1">
  <argument>-i init.hive</argument>
<ok to="end"/>
<error to="fail"/>

In this job beeline fails with an error (can be found in the hive2-oozie-**.log 
file in the appcache directory).

Connecting to jdbc:hive2://localhost:10000/default
Connected to: Apache Hive (version 1.2.1000.
Driver: Hive JDBC (version 1.2.1000.
Running init script  init.hive
  init.hive (No such file or directory)

Please note, that the Oozie job will finish with status succeeded even though 
beeline throws an error (I submitted this extra here

Interestingly, running a shell action and outputting pwd it matches with the 
 directory where also the init.hive file is located. It seems that the beeline 
client might not be started in the same local container directory - otherwise 
it should find the init.hive file.

This message was sent by Atlassian JIRA

Reply via email to