skip to main content
Using the Driver : Apache ZooKeeper
  

Try DataDirect Drivers Now

Apache ZooKeeper

Apache ZooKeeper is a centralized service that facilitates the coordination of distributed applications using a simple hierarchal architecture. In addition to supporting centralized administration of configuration information, ZooKeeper offers a number of features out of the box, including naming, synchronization, and group services. ZooKeeper services can be replicated onto server clusters, called ensembles, which allow for a scalable environment with a high-level of availability.
The driver supports Apache ZooKeeper on both 32-bit and 64-bit versions of the following operating systems:
*Windows
*Linux
*AIX
The driver supports retrieving connection information from Apache ZooKeeper services using the methods described in this section.
To retrieve connection information from an Apache ZooKeeper service:
*Set the Zookeeper Discovery option to 1 (Enabled).
*Set the Zookeeper Namespace option to specify the name of the ZooKeeper name space to which you want to retrieve configuration information. The default is /hiveserver2.
*Set the Host Name connection option to specify a list of the member servers for the ZooKeeper ensemble to which you want to connect. The value for this option takes the following form:
host_name:port_number | IP_address:port_number [, ...]
Note: The driver will return an error if unable to connect to any of the ZooKeeper servers specified with the Host Name option.
The following examples demonstrate a basic connection to Apache ZooKeeper:
Using a connection string:
DRIVER=DataDirect 8.0 Apache Hive Wire Protocol;DatabaseName=hivedb1;
HostName=ZKServer1:2181,255.125.1.11:2818,ZKServer3:2828;
ZookeeperNamespace=mynamespace1;ZookeeperDiscovery=1;
Using the odbc.ini file:
Driver=ODBCHOME/lib/ivhivexx.so
Description=DataDirect Apache Hive Wire Protocol driver
Database=hivedb1
HostName=ZKServer1:2181,255.125.1.11:2818,ZKServer3:2828
ZookeeperNamespace=mynamespace1
ZookeeperDiscovery=1
One of the primary benefits of ZooKeeper is that it provides centralized management of configuration settings. To take advantage of this feature, the driver transparently retrieves configuration information from the ZooKeeper service at connection. This information is then used to determine the behavior of the driver when establishing the session with the Hive server. However, as a result, settings for certain connection options are overridden by settings provided by the service. The following table describes the type of information typically retrieved by the driver and affected connection options.
Table 5. Configuration information retrieved from Apache ZooKeeper
Retrieved Configuration Information
Overridden Connection Options
Host name
Port number
Kerberos-related settings
Encryption-related settings
Transport mode related settings
* Configuring Apache ZooKeeper for Kerberos authentication