Class ZKPermissionWatcher
java.lang.Object
org.apache.hadoop.hbase.zookeeper.ZKListener
org.apache.hadoop.hbase.security.access.ZKPermissionWatcher
- All Implemented Interfaces:
Closeable,AutoCloseable
Handles synchronization of access control list entries and updates throughout all nodes in the
cluster. The
AccessController instance on the _acl_ table regions, creates a
znode for each table as /hbase/acl/tablename, with the znode data containing a serialized
list of the permissions granted for the table. The AccessController instances on all
other cluster hosts watch the znodes for updates, which trigger updates in the
AuthManager permission cache.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final Stringprivate final Stringprivate final AuthManagerprivate Future<?>private final ExecutorServiceprivate final CountDownLatchprivate static final org.slf4j.LoggerFields inherited from class org.apache.hadoop.hbase.zookeeper.ZKListener
watcher -
Constructor Summary
ConstructorsConstructorDescriptionZKPermissionWatcher(ZKWatcher watcher, AuthManager authManager, org.apache.hadoop.conf.Configuration conf) -
Method Summary
Modifier and TypeMethodDescriptionprivate Future<?>asyncProcessNodeUpdate(Runnable runnable) voidclose()voiddeleteNamespaceACLNode(String namespace) Delete the acl notify node of namespacevoiddeleteTableACLNode(TableName tableName) Delete the acl notify node of tablevoidnodeChildrenChanged(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 deletedprivate voidrefreshAuthManager(String entry, byte[] nodeData) private voidrefreshNodes(List<ZKUtil.NodeAndData> nodes) voidstart()private voidvoidwriteToZookeeper(byte[] entry, byte[] permsData) Write a table's access controls to the permissions mirror in zookeeperMethods inherited from class org.apache.hadoop.hbase.zookeeper.ZKListener
getWatcher
-
Field Details
-
LOG
-
ACL_NODE
- See Also:
-
authManager
-
aclZNode
-
initialized
-
executor
-
childrenChangedFuture
-
-
Constructor Details
-
ZKPermissionWatcher
public ZKPermissionWatcher(ZKWatcher watcher, AuthManager authManager, org.apache.hadoop.conf.Configuration conf)
-
-
Method Details
-
start
- Throws:
org.apache.zookeeper.KeeperException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
waitUntilStarted
-
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
-
asyncProcessNodeUpdate
-
refreshNodes
-
refreshAuthManager
- Throws:
IOException
-
writeToZookeeper
Write a table's access controls to the permissions mirror in zookeeper -
deleteTableACLNode
Delete the acl notify node of table -
deleteNamespaceACLNode
Delete the acl notify node of namespace
-