Class TestOrderedBytes

java.lang.Object
org.apache.hadoop.hbase.util.TestOrderedBytes

public class TestOrderedBytes extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • testVerifyTestIntegrity

      public void testVerifyTestIntegrity()
      Expected lengths of equivalent values should match
    • testVaruint64Boundaries

      public void testVaruint64Boundaries()
      Tests the variable uint64 encoding.

      Building sqlite4 with -DVARINT_TOOL provides this reference:
      $ ./varint_tool 240 2287 67823 16777215 4294967295 1099511627775 281474976710655 72057594037927935 18446744073709551615
      240 = f0
      2287 = f8ff
      67823 = f9ffff
      16777215 = faffffff
      4294967295 = fbffffffff
      1099511627775 = fcffffffffff
      281474976710655 = fdffffffffffff
      72057594037927935 = feffffffffffffff
      9223372036854775807 = ff7fffffffffffffff (Long.MAX_VAL)
      9223372036854775808 = ff8000000000000000 (Long.MIN_VAL)
      18446744073709551615 = ffffffffffffffffff

    • testNumericInt

      public void testNumericInt()
      Test integer encoding. Example input values come from reference wiki page.
    • testNumericReal

      public void testNumericReal()
      Test real encoding. Example input values come from reference wiki page.
    • testNumericOther

      public void testNumericOther()
      Fill gaps in Numeric encoding testing.
    • testNumericIntRealCompatibility

      Verify Real and Int encodings are compatible.
    • testInt8

      public void testInt8()
      Test int8 encoding.
    • testInt16

      public void testInt16()
      Test int16 encoding.
    • testInt32

      public void testInt32()
      Test int32 encoding.
    • testInt64

      public void testInt64()
      Test int64 encoding.
    • testFloat32

      public void testFloat32()
      Test float32 encoding.
    • testFloat64

      public void testFloat64()
      Test float64 encoding.
    • testString

      public void testString()
      Test string encoding.
    • testStringNoNullChars

      public void testStringNoNullChars()
    • testBlobVarLencodedLength

      Test length estimation algorithms for BlobVar encoding. Does not cover 0-length input case properly.
    • testBlobVar

      public void testBlobVar()
      Test BlobVar encoding.
    • testBlobCopy

      public void testBlobCopy()
      Test BlobCopy encoding.
    • testBlobCopyNoZeroBytes

      public void testBlobCopyNoZeroBytes()
      Assert invalid input byte[] are rejected by BlobCopy
    • testSkip

      public void testSkip()
      Test generic skip logic
    • testEncodedValueCheck

      public void testEncodedValueCheck()
      Test encoded value check
    • testEncodeDecodeMatch

      public void testEncodeDecodeMatch()
      Test if the data encoded by our encoding function can be decoded correctly.