You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Christoph Körner (JIRA)" <ji...@apache.org> on 2017/01/13 12:45:26 UTC

[jira] [Updated] (OOZIE-2774) Hive Action with init script (-i filename) argument is not working

     [ https://issues.apache.org/jira/browse/OOZIE-2774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christoph Körner updated OOZIE-2774:
------------------------------------
    Component/s:     (was: workflow)
                 action

> Hive Action with init script (-i filename) argument is not working
> ------------------------------------------------------------------
>
>                 Key: OOZIE-2774
>                 URL: https://issues.apache.org/jira/browse/OOZIE-2774
>             Project: Oozie
>          Issue Type: Bug
>          Components: action
>    Affects Versions: 4.2.0, 4.3.0
>         Environment: HDP 2.4, Beeline version 1.2.1000.2.4.0.0-169
>            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> property.
> Here is a minimal example (full workflow is available on Github https://github.com/chaosmail/oozie-bugs/tree/master/simple-hive-init/simple-hive-init-wf)
> {code:borderStyle=solid}
> <action name="test-action">
> <hive2 xmlns="uri:oozie:hive2-action:0.1">
>   <jdbc-url>${jdbcURL}</jdbc-url>
>   <script>query.hive</script>
>   <argument>-i init.hive</argument>
>   <file>init.hive#init.hive</file>
> </hive2>
> <ok to="end"/>
> <error to="fail"/>
> </action>
> {code}
> In this job beeline fails with an error (can be found in the hive2-oozie-**.log file in the appcache directory).
> {code:borderStyle=solid}
> more 
> Connecting to jdbc:hive2://localhost:10000/default
> Connected to: Apache Hive (version 1.2.1000.2.4.0.0-169)
> Driver: Hive JDBC (version 1.2.1000.2.4.0.0-169)
> Transaction isolation: TRANSACTION_REPEATABLE_READ
> Running init script  init.hive
>   init.hive (No such file or directory)
> {code}
> Please note, that the Oozie job will finish with status succeeded even though beeline throws an error (I submitted this extra here https://issues.apache.org/jira/browse/OOZIE-2772)
> Interestingly, running a shell action and outputting pwd it matches with the appcache/application_1480609892100_0274/container_e55_148060‌​9892100_0274_01_0000‌​01 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
(v6.3.4#6332)