Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r092

...

Info

NOTE: If you are planning to use SSL, additional configuration is required. See below.

 


Steps:

To enable the 

D s platform
 to use HTTP when connecting to Hive, please do the following.

...

  1. Create or edit the params file for your connection to Hive. This file must include the following setting for connectStrOpts:

    Code Block
    {
      "connectStrOpts": ";sasl.qop=auth-conf",
      "defaultDatabase": "default",
      "jdbc": "hive2"
    }
  2. Save the file.
  3. In your command, set the connection port value to 10001.
  4. Execute the command.
  5. Test the

    D s conntype
    typehive
     connection.

  6. If it's not working, delete the connection and try again.

Configure for 
D s conntype
typehive
 over Zookeeper Quorum

Info

NOTE:

D s conntype
typehive
2.x connections using Zookeeper Quorum are supported on HDP 2.6 only.

...

D s conntype
typehive

...

Code Block
jdbc:hive2://hdp26-w-1.c.example:2181,hdp26-w-3.c.example:2181,hdp26-w-2.c.example:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2

...

D s product

...

Host: Specify the first host value in the URL. In the above, it is this value:

Code Block
hdp26-w-1.c.example:2181,hdp26-w-3.c.example:2181,hdp26-w-2.c.example

...

Code Block
2181

...

Code Block
;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2

...

Configure
D s conntype
typehive
 connection for high availability 

Minimum requirements:

Info

NOTE: High availability for

D s conntype
typehive
is supported for HDP 3.1 using
D s conntype
typehive
2.x only. Other Hive integrations are not supported.

  • Multiple Hive servers and metastores are required.
  • A minimum of three Zookeeper server is required.

Steps:

  1. Login to Ambari.
  2. In the left nav bar, select 
    D s conntype
    typehive
  3. Copy the HiveServer2 JDBC URL to the clipboard.
  4. Paste it into a text editor. Example:
    Code Block
    jdbc:hive2://thdp-m-1-20190226193250.c.t-dev:2181,thdp-w-2-20190226193418.c.t-dev:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
    When you create the connection in 
    D s product
    :
  5. Host: Specify the hosts listed in the JDBC URL, removing the protocol and port identifiers. From the above example, the value is the following:

    Code Block
    thdp-m-1-20190226193250.c.t-dev:2181,thdp-w-2-20190226193418.c.t-dev
  6. Port Number: From the example, it is this value:
    Code Block
    2181
    Connect String Options: From the example, you must prepend the remainder with the identifier of the principal, as in the following:
    Code Block
    ;principal=hive/_HOST@HORTONWORKS;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
  7. Specify the other properties accordingly. 
  8. To test:
  9. Run a job sourced from the first
    D s conntype
    typehive
     server.
  10. If possible, disable the first listed
    D s conntype
    typehive
     server to test failover access

    .

Configure for Kerberos

For a Kerberos-enabled cluster, you must include the Kerberos principal value as part of the

D s conntype
typehive
 connection string options.

...

  • Read Access: Your Hadoop administrator must configure read permissions to Hive databases.

    • Your Hadoop administrator should provide a database table or tables for data upload to your Hive datastore.

  • Write Access: You can write jobs directly to Hive or ad-hoc publish jobs results to Hive at a later time. See Writing to Hive below.

Secure Access

Depending on the security features you've enabled, the technical methods by which 

D s item
itemusers
 access Hive may vary. For more information, see Configure Hadoop Authentication.

...