|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.Tag
@InterfaceAudience.Private @InterfaceStability.Evolving public class Tag
Tags are part of cells and helps to add metadata about the KVs. Metadata could be ACLs per cells, visibility labels, etc.
| Field Summary | |
|---|---|
static int |
INFRASTRUCTURE_SIZE
|
static int |
MAX_TAG_LENGTH
|
static int |
TAG_LENGTH_SIZE
|
static int |
TYPE_LENGTH_SIZE
|
| Constructor Summary | |
|---|---|
Tag(byte[] bytes,
int offset)
Creates a Tag from the specified byte array and offset. |
|
Tag(byte[] bytes,
int offset,
int length)
Creates a Tag from the specified byte array, starting at offset, and for length length. |
|
Tag(byte[] bytes,
int offset,
short length)
Deprecated. Use Tag(byte[], int, int) |
|
Tag(byte tagType,
byte[] tag)
|
|
Tag(byte tagType,
String tag)
|
|
| Method Summary | |
|---|---|
static List<Tag> |
asList(byte[] b,
int offset,
int length)
Creates the list of tags from the byte array b. |
static byte[] |
fromList(List<Tag> tags)
Write a list of tags into a byte array |
byte[] |
getBuffer()
|
static Tag |
getTag(byte[] b,
int offset,
int length,
byte type)
Retrieve the first tag from the tags byte array matching the passed in tag type |
int |
getTagLength()
|
int |
getTagOffset()
|
byte |
getType()
|
byte[] |
getValue()
Returns tag value in a new byte array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_LENGTH_SIZE
public static final int TAG_LENGTH_SIZE
public static final int INFRASTRUCTURE_SIZE
public static final int MAX_TAG_LENGTH
| Constructor Detail |
|---|
public Tag(byte tagType,
String tag)
public Tag(byte tagType,
byte[] tag)
tagType - tag -
public Tag(byte[] bytes,
int offset)
bytes content starting at offset is formatted as
a Tag blob.
The bytes to include the tag type, tag length and actual tag bytes.
bytes - byte arrayoffset - offset to start of Tag
@Deprecated
public Tag(byte[] bytes,
int offset,
short length)
Tag(byte[], int, int)
length. Presumes bytes content starting at
offset is formatted as a Tag blob.
bytes - byte arrayoffset - offset to start of the Taglength - length of the Tag
public Tag(byte[] bytes,
int offset,
int length)
length. Presumes bytes content starting at offset is
formatted as a Tag blob.
bytes - byte arrayoffset - offset to start of the Taglength - length of the Tag| Method Detail |
|---|
public byte[] getBuffer()
public byte getType()
public int getTagLength()
public int getTagOffset()
public byte[] getValue()
getBuffer() with appropriate getTagOffset() and getTagLength()
instead to save on allocations.
public static List<Tag> asList(byte[] b,
int offset,
int length)
b - offset - length -
public static byte[] fromList(List<Tag> tags)
tags -
public static Tag getTag(byte[] b,
int offset,
int length,
byte type)
b - offset - length - type -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||