Using User Name

This authentication mechanism requires a user name but does not require a password. The user name labels the session, facilitating database tracking.

You provide this information to the connector in the connection URL. For more information about the syntax of the connection URL, see Building the Connection URL.

Note:

This authentication mechanism is available only for Hive Server 2. Most default configurations of Hive Server 2 require User Name authentication.

To configure User Name authentication:

  1. Set the AuthMech property to 2.
  2. Set the transportMode property to sasl.
  3. Set the UID property to an appropriate user name for accessing the Hive server.

For example:

jdbc:hive2://node1.example.com:10000;AuthMech=2;
transportMode=sasl;UID=hs2