Class ZKSecretWatcher
java.lang.Object
org.apache.hadoop.hbase.zookeeper.ZKListener
org.apache.hadoop.hbase.security.token.ZKSecretWatcher
Synchronizes token encryption keys across cluster nodes.
-
Field Summary
Modifier and TypeFieldDescriptionprivate String
private static final String
private static final String
private String
private static final org.slf4j.Logger
private AuthenticationTokenSecretManager
Fields inherited from class org.apache.hadoop.hbase.zookeeper.ZKListener
watcher
-
Constructor Summary
ConstructorDescriptionZKSecretWatcher
(org.apache.hadoop.conf.Configuration conf, ZKWatcher watcher, AuthenticationTokenSecretManager secretManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
private String
getKeyNode
(int keyId) (package private) String
get token keys parent nodevoid
nodeChildrenChanged
(String path) Called when an existing node has a child node added or removed.void
nodeCreated
(String path) Called when a new node has been created.void
nodeDataChanged
(String path) Called when an existing node has changed data.void
nodeDeleted
(String path) Called when a node has been deleted(package private) void
refresh keysprivate void
refreshNodes
(List<ZKUtil.NodeAndData> nodes) void
void
start()
void
Methods inherited from class org.apache.hadoop.hbase.zookeeper.ZKListener
getWatcher
-
Field Details
-
DEFAULT_ROOT_NODE
- See Also:
-
DEFAULT_KEYS_PARENT
- See Also:
-
LOG
-
secretManager
-
baseKeyZNode
-
keysParentZNode
-
-
Constructor Details
-
ZKSecretWatcher
public ZKSecretWatcher(org.apache.hadoop.conf.Configuration conf, ZKWatcher watcher, AuthenticationTokenSecretManager secretManager)
-
-
Method Details
-
start
- Throws:
org.apache.zookeeper.KeeperException
-
nodeCreated
Description copied from class:ZKListener
Called when a new node has been created.- Overrides:
nodeCreated
in classZKListener
- Parameters:
path
- full path of the new node
-
nodeDeleted
Description copied from class:ZKListener
Called when a node has been deleted- Overrides:
nodeDeleted
in classZKListener
- Parameters:
path
- full path of the deleted node
-
nodeDataChanged
Description copied from class:ZKListener
Called when an existing node has changed data.- Overrides:
nodeDataChanged
in classZKListener
- Parameters:
path
- full path of the updated node
-
nodeChildrenChanged
Description copied from class:ZKListener
Called when an existing node has a child node added or removed.- Overrides:
nodeChildrenChanged
in classZKListener
- Parameters:
path
- full path of the node whose children have changed
-
getRootKeyZNode
-
refreshNodes
-
getKeyNode
-
removeKeyFromZK
-
addKeyToZK
-
updateKeyInZK
-
refreshKeys
void refreshKeys()refresh keys -
getKeysParentZNode
get token keys parent node- Returns:
- token keys parent node
-