@InterfaceAudience.Private public class VisibilityLabelsManager extends Object
Modifier and Type | Method and Description |
---|---|
static VisibilityLabelsManager |
get() |
static VisibilityLabelsManager |
get(ZooKeeperWatcher watcher,
org.apache.hadoop.conf.Configuration conf) |
List<String> |
getAuths(String user) |
String |
getLabel(int ordinal) |
int |
getLabelOrdinal(String label) |
int |
getLabelsCount() |
void |
refreshLabelsCache(byte[] data) |
void |
refreshUserAuthsCache(byte[] data) |
void |
writeToZookeeper(byte[] data,
boolean labelsOrUserAuths)
Writes the labels data to zookeeper node.
|
public static VisibilityLabelsManager get(ZooKeeperWatcher watcher, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public static VisibilityLabelsManager get()
public void refreshLabelsCache(byte[] data) throws IOException
IOException
public void refreshUserAuthsCache(byte[] data) throws IOException
IOException
public int getLabelOrdinal(String label)
label
- public String getLabel(int ordinal)
public int getLabelsCount()
public List<String> getAuths(String user)
user
- public void writeToZookeeper(byte[] data, boolean labelsOrUserAuths)
data
- labelsOrUserAuths
- true for writing labels and false for user auths.Copyright © 2014 The Apache Software Foundation. All rights reserved.