Hive 2 action

Oozie also has Hive 2 action, where we can use Hive Server 2 and execute our Hive queries. Hive 2 action uses Beeline to execute queries via the Hive Server 2.

Here's the general command to talk to the Beeline server:

beeline> !connect jdbc:hive2://localhost:10000 username password org.apache.hive.jdbc.HiveDriver

Tip

To know more about how Beeline and Hive Server 2 work, check out the Cloudera website blog post at http://blog.cloudera.com/blog/2014/02/migrating-from-hive-cli-to-beeline-a-primer/.

The general schema for Hive action is as follows:

<action> <job-tracker> // Job tracker details <name-node> // Name node details <prepare> // Create or Delete directory <job-xml> // Any job xml properties <configuration> // Hadoop job configuration ...

Get Apache Oozie Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.