Support Questions
Find answers, ask questions, and share your expertise

OOZIE - credentials in are not used by hive action?


Dear oozie experts, I've been working a lot with oozie the last month and am pretty confident I created a proper workflow with lots of parameterizations. I am now at a stage where I'm removing redundant text (changing fullpaths to relative ones (where allowed) etc).

One thing I can't get my head around though is the requirement for a hive action to have the credentials part in the top part of your workflow.xml. As these credentials are already part of the files it doesn't seem logic to duplicate those properties in the workflow.xml. anyone knows why this is required?

Is this just a limitation of the hive-action schema?


? Not sure what you mean with "as these credentials are already part of the file"

The Credentials tag is an XML tag that needs to be there in your workflow.xml for oozie to do the kerberos ticket initialization. He then sends uses these tickets for all actions that reference them. The is only there to parametrize tags. It cannot replace tags in the workflow.xml


As Ben said there is no functionality from items within the, without referencing the tags within the workflow they will never be used. You'd want to store these tags in the file if they change often(such as across different environments) but you still want to use the same workflow, saves you having to go in and edit the workflow each time. Plus it looks a bit nicer 🙂


I think I get what you are saying but how do I reference a variable like credentials in the for say the hive action? The tags in the files are stored like this (at least when created by the hue oozie editor)

credentials={u'hcat': {'xml_name': u'hcat', 'properties': [('hcat.metastore.uri', u'thrift://[SERVER]:[PORT]'), ('hcat.metastore.principal', u'hive/[SERVER]')]}, u'hive2': {'xml_name': u'hive2', 'properties': [('hive2.jdbc.url', 'jdbc:hive2://[SERVER]:10000/default'), ('hive2.server.principal', 'hive/[SERVER]')]}, None: {'xml_name': None, 'properties': []}}

all other properties are stored like:


and are referenced by the ${VARIABLE_NAME} but the credentials are stored differently.


Hi Rene,

I don't normally use hue so i'm not entirely sure how it creates the job properties. When I store the hive credentials in I like to do it like this:


Then at the top of the Oozie workflow.xml declare these credentials

<credential name="hive2Cred" type="hive2">

Then finally reference these credentials in your Hive Action:

<action name="exampleHive" cred="hive2Cred">
<hive2 xmlns="uri:oozie:hive2-action:0.1">
<ok to="end" />
<error to="fail" />


Thanks for your detailed explanation Daniel! I know how to use variables from my but somehow the credentials part is stored completely different by the hue editor. It looks like it's converted the credentials xml part into json and put that part in the

@Rene Sluiter Hue is the devil for oozie development ( great for management and administration though ) The start is easy but afterwards it only makes problems. A good XML editor is the way to go I think 🙂


any thoughts about my comment @Daniel Perry or @Benjamin Leonhardi?