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
Modifier and TypeFieldDescriptionprivate static final String
private static final String
private VisibilityLabelsCache
private String
private static final org.slf4j.Logger
private String
private static final String
private static final String
Fields inherited from class org.apache.hadoop.hbase.zookeeper.ZKListener
watcher
-
Constructor Summary
ConstructorDescriptionZKVisibilityLabelWatcher
(ZKWatcher watcher, VisibilityLabelsCache labelsCache, org.apache.hadoop.conf.Configuration conf) -
Method Summary
Modifier and TypeMethodDescriptionvoid
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 deletedprivate void
refreshUserAuthsCache
(byte[] data) private void
refreshVisibilityLabelsCache
(byte[] data) void
start()
void
writeToZookeeper
(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: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
-
writeToZookeeper
Write a labels mirror or user auths mirror into zookeeper- Parameters:
labelsOrUserAuths
- true for writing labels and false for user auths.
-