Configuring Hive to Access Data Catalog Metastore
-
To configure Data Catalog metastore
libs
and associated Object Storagejars
, sign in to the un0 node in your cluster and run followingdcli
command.$ sudo dcli bash /usr/lib/oci-dcat-metastore-client/bin/configure-metastore-jars.sh
Note
To undo and restore the original jars, run$ sudo dcli bash /usr/lib/oci-dcat-metastore-client/bin/configure-metastore-jars.sh undo
. - Access Apache Ambari.
- From the side toolbar, under Services select Hive.
- Select the Configs tab, and then select Advanced.
- Expand the Custom hive-site section.
-
Add or update the
oci.metastore.uris
key with the Data Catalog endpoint. Example:https://datacatalog.<region-identifier>.oci.oraclecloud.com:443
. -
Add or update the
oracle.dcat.metastore.id
key with the OCID for the metastore that you want to use. Example:ocid1.datacatalogmetastore.oc1.<unique_ID>
. -
Add or update the
oracle.dcat.metastore.client.custom.authentication_provider
key with the valuecom.oracle.pic.dcat.metastore.commons.auth.provider.UserPrincipalsCustomAuthenticationDetailsProvider
. -
Add or update the
hive.metastore.warehouse.dir
key with the Object Storage path for the managed table. Example:oci://bucket-name@tenancy-name-of-bucket/path/to/managed/table/directory
. -
Add or update the
hive.metastore.warehouse.external.dir
key with the Object Storage path for the external table. Example:oci://bucket-name@tenancy-name-of-bucket/path/to/external/table/directory
. -
Add or update the
hive.metastore.uris
key with the Data Catalog endpoint. Example:https://datacatalog.<region-identifier>.oci.oraclecloud.com:443
. -
Add or update the
OCI_TENANT_METADATA
key with the OCID of the client tenancy. Example:ocid1.tenancy.oc1.<unique_ID>
. -
Add or update the
OCI_USER_METADATA
key with the OCID of the user calling the Metadata API. Example:ocid1.user.oc1.<unique_ID>
. -
Add or update the
OCI_FINGERPRINT_METADATA
key with the fingerprint for the key pair being used. Example:54:53:cd:d0:f1:ee:b7:c9:b5:52:d5:27:2c:58:36:13
. -
Add or update the
OCI_PVT_KEY_FILE_PATH
key with the full path and file name of the private key used for authentication. We recommend the file be on the local file system. Example:/etc/hive/key.pem
.Note
Ensure that the key file is placed on all nodes and readable by Hive and Tez users. -
Add or update the
OCI_PASSPHRASE_METADATA
key with a passphase, if any. -
Add or update the
OCI_REGION_METADATA
key with the region. Example:us-ashburn-1
. - Select Restart to restart the Hive service in the Big Data Service cluster.