Skip to content

HBase in Oozie shell action

HBase in Oozie shell action

You can manipulate HBase tables through Oozie with Java or Shell actions. In order to use Shell action, you of course need to prepare a Shell script.

 

HOW TO

I used CDH 5.8.4 with Kerberos.
 
If you use Kerberos, first thing you need to do is the kinit command. You can either run it manually in the console before processing or include it at the very beginning of your shell script.

 
Within the shell script you can run any command available in HBase shell (I found this blog very useful). You just need to follow the pattern below:

Example

Inside the script you may of course add any non-HBase logic like loops or conditions. Just remember to finish your script with exit command.

 

Example script

Now that you have a script you need an Oozie action:

Leave a Reply

Your email address will not be published. Required fields are marked *