Class LeveldbUtils.KeyBuilder

java.lang.Object
org.apache.hadoop.yarn.server.timeline.util.LeveldbUtils.KeyBuilder
Enclosing class:
LeveldbUtils

public static class LeveldbUtils.KeyBuilder extends Object
A string builder utility for building timeline server leveldb keys.
  • Constructor Details

    • KeyBuilder

      public KeyBuilder(int size)
  • Method Details

    • newInstance

      public static LeveldbUtils.KeyBuilder newInstance()
    • newInstance

      public static LeveldbUtils.KeyBuilder newInstance(int size)
      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

      public LeveldbUtils.KeyBuilder add(byte[] t)
    • add

      public LeveldbUtils.KeyBuilder add(byte[] t, boolean sep)
    • 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.