Class HFilePerformanceEvaluation

java.lang.Object
org.apache.hadoop.hbase.HFilePerformanceEvaluation

@LimitedPrivate("Tools") public class HFilePerformanceEvaluation extends Object
This class runs performance benchmarks for HFile.
  • Field Details

  • Constructor Details

  • Method Details

    • format

      static byte[] format(int i)
    • format

      static org.apache.hadoop.hbase.io.ImmutableBytesWritable format(int i, org.apache.hadoop.hbase.io.ImmutableBytesWritable w)
    • createCell

      static org.apache.hadoop.hbase.Cell createCell(int i)
    • createCell

      static org.apache.hadoop.hbase.Cell createCell(int i, byte[] value)
      HFile is Cell-based. It used to be byte arrays. Doing this test, pass Cells. All Cells intentionally have same coordinates in all fields but row.
      Parameters:
      i - Integer to format as a row Key.
      value - Value to use
      Returns:
      Created Cell.
    • createCell

      static org.apache.hadoop.hbase.Cell createCell(byte[] keyRow)
    • createCell

      static org.apache.hadoop.hbase.Cell createCell(byte[] keyRow, byte[] value)
    • runBenchmarks

      private void runBenchmarks() throws Exception
      Add any supported codec or cipher to test the HFile read/write performance. Specify "none" to disable codec or cipher or both.
      Throws:
      Exception
    • runWriteBenchmark

      private void runWriteBenchmark(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path mf, String codec, String cipher) throws Exception
      Write a test HFile with the given codec & cipher
      Parameters:
      codec - "none", "lzo", "gz", "snappy"
      cipher - "none", "aes"
      Throws:
      Exception
    • runReadBenchmark

      private void runReadBenchmark(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path mf, String codec, String cipher)
      Run all the read benchmarks for the test HFile
      Parameters:
      codec - "none", "lzo", "gz", "snappy"
      cipher - "none", "aes"
    • runBenchmark

      protected void runBenchmark(HFilePerformanceEvaluation.RowOrientedBenchmark benchmark, int rowCount, String codec, String cipher) throws Exception
      Throws:
      Exception
    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception
    • getCipherName

      private String getCipherName(org.apache.hadoop.conf.Configuration conf, String cipherName)