@InterfaceAudience.Public public interface VisibilityLabelService extends org.apache.hadoop.conf.Configurable
| Modifier and Type | Method and Description |
|---|---|
OperationStatus[] |
addLabels(List<byte[]> labels)
Adds the set of labels into the system.
|
OperationStatus[] |
clearAuths(byte[] user,
List<byte[]> authLabels)
Removes given labels from user's globally authorized list of labels.
|
List<Tag> |
createVisibilityExpTags(String visExpression,
boolean withSerializationFormat,
boolean checkAuths)
Creates tags corresponding to given visibility expression.
|
byte[] |
encodeVisibilityForReplication(List<Tag> visTags,
Byte serializationFormat)
Provides a way to modify the visibility tags of type
TagType .VISIBILITY_TAG_TYPE, that
are part of the cell created from the WALEdits that are prepared for replication while calling
ReplicationEndpoint .replicate(). |
List<String> |
getGroupAuths(String[] groups,
boolean systemCall)
Retrieve the visibility labels for the groups.
|
List<String> |
getUserAuths(byte[] user,
boolean systemCall)
Retrieve the visibility labels for the user.
|
VisibilityExpEvaluator |
getVisibilityExpEvaluator(Authorizations authorizations)
Creates VisibilityExpEvaluator corresponding to given Authorizations.
|
boolean |
havingSystemAuth(User user)
System checks for user auth during admin operations.
|
void |
init(RegionCoprocessorEnvironment e)
System calls this after opening of regions.
|
List<String> |
listLabels(String regex)
Retrieve the list of visibility labels defined in the system.
|
boolean |
matchVisibility(List<Tag> putVisTags,
Byte putVisTagFormat,
List<Tag> deleteVisTags,
Byte deleteVisTagFormat)
System uses this for deciding whether a Cell can be deleted by matching visibility expression
in Delete mutation and the cell in consideration.
|
OperationStatus[] |
setAuths(byte[] user,
List<byte[]> authLabels)
Sets given labels globally authorized for the user.
|
void init(RegionCoprocessorEnvironment e) throws IOException
IOExceptionOperationStatus[] addLabels(List<byte[]> labels) throws IOException
IOExceptionOperationStatus[] setAuths(byte[] user, List<byte[]> authLabels) throws IOException
IOExceptionOperationStatus[] clearAuths(byte[] user, List<byte[]> authLabels) throws IOException
IOExceptionList<String> getUserAuths(byte[] user, boolean systemCall) throws IOException
IOExceptionList<String> getGroupAuths(String[] groups, boolean systemCall) throws IOException
IOExceptionList<String> listLabels(String regex) throws IOException
regex - The regular expression to filter which labels are returned.IOExceptionList<Tag> createVisibilityExpTags(String visExpression, boolean withSerializationFormat, boolean checkAuths) throws IOException
visExpression - The Expression for which corresponding Tags to be created.withSerializationFormat - specifies whether a tag, denoting the serialization version of
the tags, to be added in the list. When this is true make sure
to add the serialization format Tag also. The format tag value
should be byte type.checkAuths - denotes whether to check individual labels in visExpression
against user's global auth label.IOExceptionVisibilityExpEvaluator getVisibilityExpEvaluator(Authorizations authorizations) throws IOException
IOExceptionboolean havingSystemAuth(User user) throws IOException
IOExceptionboolean matchVisibility(List<Tag> putVisTags, Byte putVisTagFormat, List<Tag> deleteVisTags, Byte deleteVisTagFormat) throws IOException
null value for this format
means the tags are written with unsorted label ordinals n * - The visibility tags in the delete
mutation (the specified Cell Visibility) n * The serialization format for the Delete visibility
tags. A null value for this format means the tags are written with unsorted label
ordinalsIOExceptionVisibilityConstants.SORTED_ORDINAL_SERIALIZATION_FORMATbyte[] encodeVisibilityForReplication(List<Tag> visTags, Byte serializationFormat) throws IOException
TagType .VISIBILITY_TAG_TYPE, that
are part of the cell created from the WALEdits that are prepared for replication while calling
ReplicationEndpoint .replicate().
VisibilityReplicationEndpoint calls this
API to provide an opportunity to modify the visibility tags before replicating. n * the
visibility tags associated with the cell n * the serialization format associated with the tagIOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.