0
votes

I have a secured hadoop cluster and I want to run hive action using oozie rest api.I was able to run Hive Action using workflow.xml via Oozie rest api.But if I try to run the same hive action without using workflow.xml (passing configuration in payload) it fails due to credentials.Is there any way using which I can pass this credentials in payload of Oozie rest api.

1

1 Answers

0
votes

Step 1: upload the workflow.xml (or whatever.0F253C.xml) script, including parameters in the credentials definition, to HDFS using either WebHDFS or HttpFS REST API

    <credentials>
        <credential name='HiveMetastore' type='hcat'>
            <property>
              <name>hcat.metastore.uri</name>
              <value>${hiveMetastoreURI}</value>
            </property>
            <property>
              <name>hcat.metastore.principal</name>
              <value>${hivePrincipal}</value>
            </property>
        </credential>
  </credentials>

...

<action name="DummyHive" cred="HiveMetastore">
    <hive xmlns="uri:oozie:hive-action:0.3">

...

Step 2: submit a workflow with that XML script plus actual values for parameters

oozie.wf.application.path=/user/johndoe/hic_sunt_leones/whatever.0F253C.xml
hiveMetastoreURI=thrift://dummy.nsa.gov:9083
hivePrincipal=hive/[email protected]

...