2017-04-26 4 views
1

liefern Ich möchte Variable wie hiveconf Namespace von meinem Bienenstock-Oozie Aktion, wie man das tun?Wie hiveconf Variable vom Bienenstock Oozie Aktion

<action name="setupAct"> 
 
    <hive xmlns="uri:oozie:hive-action:0.2"> 
 
    <job-tracker>maprfs:///</job-tracker> 
 
    <name-node>maprfs:///</name-node> 
 
    <script> 
 
     XYZ.hql 
 
    </script> 
 
    <!--how to add variable to hiveconf--> 
 
    <param>DB_NAME=test</param> 
 
    </hive> 
 
    <ok to="ok" /> 
 
    <error to="error" /> 
 
</action>

Die Werte innerhalb param Element als --hivevar Namensraum liedern geliefert.

Nachfolgend finden Sie Anwendungsprotokoll, wird das param-Element als hivevar hinzugefügt:

------------------------ 
    DB_NAME=test 
------------------------ 
Hive command arguments : 
     --hivevar 
     DB_NAME=test 
     -f 
     test.hql 

Antwort

1

Für hiveconf in Oozie, Verwenden Sie die Konfiguration Element.

<hive xmlns="uri:oozie:hive-action:0.2"> 
    <job-tracker>maprfs:///</job-tracker> 
    <name-node>maprfs:///</name-node> 
    <script> 
     XYZ.hql 
    </script> 
    <!--how to add variable to hiveconf--> 
    <configuration> 
     <property> 
      <name>hive.default.fileformat</name> 
      <value>Parquet</value> 
     </property> 
    </configuration> 
    <param>DB_NAME=test</param> 
    </hive> 
Verwandte Themen