Class ZKVisibilityLabelWatcher
java.lang.Object
org.apache.hadoop.hbase.zookeeper.ZKListener
org.apache.hadoop.hbase.security.visibility.ZKVisibilityLabelWatcher
A zk watcher that watches the labels table znode. This would create a znode
 /hbase/visibility_labels and will have a serialized form of a set of labels in the system.
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Stringprivate VisibilityLabelsCacheprivate Stringprivate static final org.slf4j.Loggerprivate Stringprivate static final Stringprivate static final StringFields inherited from class org.apache.hadoop.hbase.zookeeper.ZKListener
watcher - 
Constructor Summary
ConstructorsConstructorDescriptionZKVisibilityLabelWatcher(ZKWatcher watcher, VisibilityLabelsCache labelsCache, org.apache.hadoop.conf.Configuration conf)  - 
Method Summary
Modifier and TypeMethodDescriptionvoidnodeChildrenChanged(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 voidrefreshUserAuthsCache(byte[] data) private voidrefreshVisibilityLabelsCache(byte[] data) voidstart()voidwriteToZookeeper(byte[] data, boolean labelsOrUserAuths) Write a labels mirror or user auths mirror into zookeeperMethods inherited from class org.apache.hadoop.hbase.zookeeper.ZKListener
getWatcher 
- 
Field Details
- 
LOG
 - 
VISIBILITY_LABEL_ZK_PATH
- See Also:
 
 - 
DEFAULT_VISIBILITY_LABEL_NODE
- See Also:
 
 - 
VISIBILITY_USER_AUTHS_ZK_PATH
- See Also:
 
 - 
DEFAULT_VISIBILITY_USER_AUTHS_NODE
- See Also:
 
 - 
labelsCache
 - 
labelZnode
 - 
userAuthsZnode
 
 - 
 - 
Constructor Details
- 
ZKVisibilityLabelWatcher
public ZKVisibilityLabelWatcher(ZKWatcher watcher, VisibilityLabelsCache labelsCache, org.apache.hadoop.conf.Configuration conf)  
 - 
 - 
Method Details
- 
start
- Throws:
 org.apache.zookeeper.KeeperException
 - 
refreshVisibilityLabelsCache
 - 
refreshUserAuthsCache
 - 
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
 - 
writeToZookeeper
Write a labels mirror or user auths mirror into zookeeper- Parameters:
 labelsOrUserAuths- true for writing labels and false for user auths.
 
 -