Class LeveldbUtils.KeyBuilder
java.lang.Object
org.apache.hadoop.yarn.server.timeline.util.LeveldbUtils.KeyBuilder
- Enclosing class:
- LeveldbUtils
A string builder utility for building timeline server leveldb keys.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(byte[] t) add(byte[] t, boolean sep) byte[]getBytes()Builds a byte array without the final string delimiter.byte[]Builds a byte array including the final string delimiter.static LeveldbUtils.KeyBuilderstatic LeveldbUtils.KeyBuildernewInstance(int size) Instantiate a new key build with the given maximum subkes.
-
Constructor Details
-
KeyBuilder
public KeyBuilder(int size)
-
-
Method Details
-
newInstance
-
newInstance
Instantiate a new key build with the given maximum subkes.- Parameters:
size- maximum subkeys that can be added to this key builder- Returns:
- a newly constructed key builder
-
add
-
add
-
add
-
getBytes
public byte[] getBytes()Builds a byte array without the final string delimiter. -
getBytesForLookup
public byte[] getBytesForLookup()Builds a byte array including the final string delimiter.
-