@InterfaceAudience.Private public class VisibilityUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
SYSTEM_LABEL |
static Tag |
VIS_SERIALIZATION_TAG |
static byte |
VISIBILITY_EXP_SERIALIZATION_TAG_TYPE |
static String |
VISIBILITY_LABEL_GENERATOR_CLASS |
static byte |
VISIBILITY_TAG_TYPE |
Constructor and Description |
---|
VisibilityUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
checkForMatchingVisibilityTags(Cell cell,
List<Tag> visibilityTagsInDeleteCell)
Checks for the matching visibility labels in the delete mutation and
the cell in consideration
|
static byte[] |
getDataToWriteToZooKeeper(Map<String,Integer> existingLabels)
Creates the labels data to be written to zookeeper.
|
static List<ScanLabelGenerator> |
getScanLabelGenerators(org.apache.hadoop.conf.Configuration conf) |
static byte[] |
getUserAuthsDataToWriteToZooKeeper(Map<String,List<Integer>> userAuths)
Creates the user auth data to be written to zookeeper.
|
static boolean |
getVisibilityTags(Cell cell,
List<Tag> tags)
Get the list of visibility tags in the given cell
|
static boolean |
isVisibilityTagsPresent(Cell cell)
Checks if the cell has a visibility tag
|
static List<VisibilityLabelsProtos.VisibilityLabel> |
readLabelsFromZKData(byte[] data)
Reads back from the zookeeper.
|
static VisibilityLabelsProtos.MultiUserAuthorizations |
readUserAuthsFromZKData(byte[] data)
Reads back User auth data written to zookeeper.
|
public static final String VISIBILITY_LABEL_GENERATOR_CLASS
public static final byte VISIBILITY_TAG_TYPE
public static final byte VISIBILITY_EXP_SERIALIZATION_TAG_TYPE
public static final String SYSTEM_LABEL
public static final Tag VIS_SERIALIZATION_TAG
public static byte[] getDataToWriteToZooKeeper(Map<String,Integer> existingLabels)
existingLabels
- public static byte[] getUserAuthsDataToWriteToZooKeeper(Map<String,List<Integer>> userAuths)
userAuths
- public static List<VisibilityLabelsProtos.VisibilityLabel> readLabelsFromZKData(byte[] data) throws DeserializationException
data
- DeserializationException
public static VisibilityLabelsProtos.MultiUserAuthorizations readUserAuthsFromZKData(byte[] data) throws DeserializationException
data
- DeserializationException
public static List<ScanLabelGenerator> getScanLabelGenerators(org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public static boolean getVisibilityTags(Cell cell, List<Tag> tags)
cell
- - the celltags
- - the tags array that will be populated if
visibility tags are presentpublic static boolean isVisibilityTagsPresent(Cell cell)
cell
- public static boolean checkForMatchingVisibilityTags(Cell cell, List<Tag> visibilityTagsInDeleteCell)
cell
- - the cellvisibilityTagsInDeleteCell
- - that list of tags in the delete mutation
(the specified Cell Visibility)Copyright © 2014 The Apache Software Foundation. All rights reserved.