Accessing Hive from an external node

In CDP public cloud, most of the services are accessible through the Apache Knox gateway including Apache Hive. You need to know the URL of the Data Hubs cluster to use from an external cluster and the Beeline command to run from an external node.

  • In CDP Public Cloud, you must be running the Knox, Hive Metastore, and Hive services.
  • The external node must be on a cluster that CDP Public Cloud can access.
  • On an external cluster, you must be authorized to access the CDP Public Cloud Data Hub cluster.
  1. In CDP Public Cloud, in Cloudera Manager navigate to Data Hub Clusters > Endpoints tab, and copy the Hive Server endpoint.
    If you are not running the required services, the URL you need to copy is not listed in Endpoints.
  2. On the external node, enter the command to launch Hive.
    beeline -p -u '<Hive Endpoint URL>;user=<your CDP user>'
    For example:
    beeline -p -u 'jdbc:hive2://;ssl=true;transportMode=http;httpPath=test5/cdp-proxy-api/hive;user=john'
    The Hive prompt appears after entering the password, and you can enter Hive queries.