Configuring Service Discovery Mode

You can configure the Simba Apache Hive ODBC Connector to discover Hive Server 2 services through ZooKeeper.

You can set the connection properties described below in a connection string, in a DSN (in the odbc.ini file), or as a connector-wide setting (in the simba.hiveodbc.ini file). Settings in the connection string take precedence over settings in the DSN, and settings in the DSN take precedence over connector-wide settings.

To enable Service Discovery Mode:

  1. Set the ServiceDiscoveryMode connection attribute to 1.
  2. Set the ZKNamespace connection attribute to specify the namespace on ZooKeeper under which Hive Server 2 znodes are added.
  3. Set the Host connection attribute to specify the ZooKeeper ensemble as a comma-separated list of ZooKeeper servers. For example, type the following, where [ZK_Host] is the IP address or host name of the ZooKeeper server and [ZK_Port] is the number of the TCP port that the ZooKeeper server uses to listen for client connections:
  4. [ZK_Host1]:[ZK_Port1],[ZK_Host2]:[ZK_Port2]

Important:

Important:

When ServiceDiscoveryMode is set to 1, connections to Hive Server 1 are not supported and the Port connection attribute is not applicable.