Prerequisites

Before attempting to execute the example that demonstrates the concepts presented in this section, you should first satisfy the following prerequisites:

  • Become familiar with Apache Hive 2 and its programming model. Specifically, become familiar with how to write and execute a Hive query.
  • Become familiar with Apache Hadoop 3. Specifically, become familiar with how Hive and Hadoop interact.
  • Deploy a Hadoop cluster with 3 data nodes running on machines with host names, dn-host-1, dn-host-2, and dn-host-3.
  • Become familiar with the Hive Command Line Interface (the Hive CLI), and the Hive Query Language.
  • Become familiar with Oracle NoSQL Database (see Introduction to Oracle NoSQL Database in the Concepts Guide) and then install, start, and configure an Oracle NoSQL Database that is network reachable from the nodes of the Hadoop cluster and any Hive clients. The KVHOME of the store that you start should be configured as the directory /opt/oracle/kv-ee.
  • Deploy a store to 3 machines (real or virtual) with host names, kv-host-1, kv-host-2, and kv-host-3. The store's name should be set to the value example-store, and the store's KVROOT should be set to the directories /u01/nosql/sn1/kvroot on kv-host-1, /u02/nosql/sn2/kvroot on kv-host-2, and /u03/nosql/sn3/kvroot on kv-host-3. Finally, an Oracle NoSQL Database admin service, listening on port 5000, should be deployed to each host making up the store.
  • Become familiar with the Oracle NoSQL Database Security model and be able to configure the deployed store for secure access (optional).
  • If the deployed store is configured for secure access, start the Oracle NoSQL Database Administrative CLI and then follow the steps presented in the Deploying a Secure Store appendix to securely connect to the store and create a user named example-user, along with the appropriate security artifacts (login file, trust file, and either password file or Oracle Wallet).
  • Obtain and install the separate distribution containing the Oracle NoSQL Database example code (see Oracle Technology Network). Although you are free to install that package in any location on your system, for simplicity this document assumes the example code is installed under the directory /opt/oracle/nosql/apps/kv/examples.
  • Become familiar with the supporting Java classes presented in the Integration with Apache Hadoop MapReduce section, and then follow the steps presented in that document to create and populate the table named vehicleTable with example data consisting of only primitive data types.
  • Become familiar with the LoadRmvTable program provided in the Oracle NoSQL Database example distribution, and then follow the steps presented in the Creating and Populating the rmvTable appendix to create and populate a table named rmvTable with example data consisting of both primitive and non-primitive data types.
  • Become familiar with the LoadJsonExample program provided in the Oracle NoSQL Database example distribution, and then follow the steps presented in the Creating and Populating the exampleJsonTable appendix to create and populate a table named exampleJsonTable with rows containing valid JSON formatted data (documents).

Using specific values for items such as the KVHOME and KVROOT environment variables, as well as the store name, host names, admin port, and example code location described above should allow you to more easily understand and use the example commands. Combined with the information contained in the Concepts Guide, along with the Administrator's Guide and Security Guide, you should then be able to generalize and extend these examples to your own particular development scenario; substituting the values specific to the given environment where necessary.

Detailed instructions for deploying a non-secure Oracle NoSQL Database store are provided in the Deploying a Non-Secure Store appendix. Similarly, the Deploying a Secure Store appendix provides instructions for deploying a store configured for security.