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
FieldsModifier and TypeFieldDescriptionprivate Stringprivate static final Stringprivate static final Stringprivate Stringprivate static final org.slf4j.Loggerprivate AuthenticationTokenSecretManagerFields inherited from class org.apache.hadoop.hbase.zookeeper.ZKListener
watcher -
Constructor Summary
ConstructorsConstructorDescriptionZKSecretWatcher(org.apache.hadoop.conf.Configuration conf, ZKWatcher watcher, AuthenticationTokenSecretManager secretManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate StringgetKeyNode(int keyId) (package private) Stringget token keys parent nodevoidnodeChildrenChanged(String path) Called when an existing node has a child node added or removed.voidnodeCreated(String path) Called when a new node has been created.voidnodeDataChanged(String path) Called when an existing node has changed data.voidnodeDeleted(String path) Called when a node has been deleted(package private) voidrefresh keysprivate voidrefreshNodes(List<ZKUtil.NodeAndData> nodes) voidvoidstart()voidMethods 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:ZKListenerCalled when a new node has been created.- Overrides:
nodeCreatedin classZKListener- Parameters:
path- full path of the new node
-
nodeDeleted
Description copied from class:ZKListenerCalled when a node has been deleted- Overrides:
nodeDeletedin classZKListener- Parameters:
path- full path of the deleted node
-
nodeDataChanged
Description copied from class:ZKListenerCalled when an existing node has changed data.- Overrides:
nodeDataChangedin classZKListener- Parameters:
path- full path of the updated node
-
nodeChildrenChanged
Description copied from class:ZKListenerCalled when an existing node has a child node added or removed.- Overrides:
nodeChildrenChangedin 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
-