Enum Class IndexBlockEncoding

java.lang.Object
java.lang.Enum<IndexBlockEncoding>
org.apache.hadoop.hbase.io.encoding.IndexBlockEncoding
All Implemented Interfaces:
Serializable, Comparable<IndexBlockEncoding>, Constable

@Public public enum IndexBlockEncoding extends Enum<IndexBlockEncoding>
Provide access to all index block encoding algorithms. All of the algorithms are required to have unique id which should NEVER be changed. If you want to add a new algorithm/version, assign it a new id. Announce the new id in the HBase mailing list to prevent collisions.
  • Enum Constant Details

  • Field Details

  • Constructor Details

  • Method Details

    • values

      public static IndexBlockEncoding[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static IndexBlockEncoding valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getNameInBytes

      public byte[] getNameInBytes()
      Returns name converted to bytes.
    • getId

      public short getId()
      Returns The id of a data block encoder.
    • writeIdInBytes

      public void writeIdInBytes(OutputStream stream) throws IOException
      Writes id in bytes.
      Parameters:
      stream - where the id should be written.
      Throws:
      IOException
    • writeIdInBytes

      public void writeIdInBytes(byte[] dest, int offset) throws IOException
      Writes id bytes to the given array starting from offset.
      Parameters:
      dest - output array
      offset - starting offset of the output array
      Throws:
      IOException
    • getNameFromId

      public static String getNameFromId(short encoderId)
      Find and return the name of data block encoder for the given id.
      Parameters:
      encoderId - id of data block encoder
      Returns:
      name, same as used in options in column family
    • getEncodingById

      public static IndexBlockEncoding getEncodingById(short indexBlockEncodingId)