Package org.apache.hadoop.util.curator
Class ZKCuratorManager.HadoopZookeeperFactory
java.lang.Object
org.apache.hadoop.util.curator.ZKCuratorManager.HadoopZookeeperFactory
- All Implemented Interfaces:
org.apache.curator.utils.ZookeeperFactory
- Enclosing class:
- ZKCuratorManager
public static class ZKCuratorManager.HadoopZookeeperFactory
extends Object
implements org.apache.curator.utils.ZookeeperFactory
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHadoopZookeeperFactory(String zkPrincipal) Constructor for the helper class to configure the ZooKeeper client connection.HadoopZookeeperFactory(String zkPrincipal, String kerberosPrincipal, String kerberosKeytab) Constructor for the helper class to configure the ZooKeeper client connection.HadoopZookeeperFactory(String zkPrincipal, String kerberosPrincipal, String kerberosKeytab, boolean sslEnabled, SecurityUtil.TruststoreKeystore truststoreKeystore) Constructor for the helper class to configure the ZooKeeper client connection. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.zookeeper.ZooKeepernewZooKeeper(String connectString, int sessionTimeout, org.apache.zookeeper.Watcher watcher, boolean canBeReadOnly) org.apache.zookeeper.ZooKeepernewZooKeeper(String connectString, int sessionTimeout, org.apache.zookeeper.Watcher watcher, boolean canBeReadOnly, org.apache.zookeeper.client.ZKClientConfig zkClientConfig)
-
Field Details
-
JAAS_CLIENT_ENTRY
- See Also:
-
-
Constructor Details
-
HadoopZookeeperFactory
Constructor for the helper class to configure the ZooKeeper client connection.- Parameters:
zkPrincipal- Optional.
-
HadoopZookeeperFactory
Constructor for the helper class to configure the ZooKeeper client connection.- Parameters:
zkPrincipal- Optional.kerberosPrincipal- Optional. Use along with kerberosKeytab.kerberosKeytab- Optional. Use along with kerberosPrincipal.
-
HadoopZookeeperFactory
public HadoopZookeeperFactory(String zkPrincipal, String kerberosPrincipal, String kerberosKeytab, boolean sslEnabled, SecurityUtil.TruststoreKeystore truststoreKeystore) Constructor for the helper class to configure the ZooKeeper client connection.- Parameters:
zkPrincipal- Optional.kerberosPrincipal- Optional. Use along with kerberosKeytab.kerberosKeytab- Optional. Use along with kerberosPrincipal.sslEnabled- Flag to enable SSL/TLS ZK client connection for each component independently.truststoreKeystore- TruststoreKeystore object containing the keystoreLocation, keystorePassword, truststoreLocation, truststorePassword for SSL/TLS connection when sslEnabled is set to true.
-
-
Method Details
-
newZooKeeper
public org.apache.zookeeper.ZooKeeper newZooKeeper(String connectString, int sessionTimeout, org.apache.zookeeper.Watcher watcher, boolean canBeReadOnly) throws Exception - Specified by:
newZooKeeperin interfaceorg.apache.curator.utils.ZookeeperFactory- Throws:
Exception
-
newZooKeeper
public org.apache.zookeeper.ZooKeeper newZooKeeper(String connectString, int sessionTimeout, org.apache.zookeeper.Watcher watcher, boolean canBeReadOnly, org.apache.zookeeper.client.ZKClientConfig zkClientConfig) throws Exception - Specified by:
newZooKeeperin interfaceorg.apache.curator.utils.ZookeeperFactory- Throws:
Exception
-