Package org.apache.hadoop.hbase
Class HFilePerformanceEvaluation
java.lang.Object
org.apache.hadoop.hbase.HFilePerformanceEvaluation
This class runs performance benchmarks for
HFile.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) static class(package private) static class(package private) static class(package private) static class(package private) static class(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate static final intprivate static final intprivate static final intprivate static StringBuilder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static org.apache.hadoop.hbase.CellcreateCell(byte[] keyRow) (package private) static org.apache.hadoop.hbase.CellcreateCell(byte[] keyRow, byte[] value) (package private) static org.apache.hadoop.hbase.CellcreateCell(int i) (package private) static org.apache.hadoop.hbase.CellcreateCell(int i, byte[] value) HFile is Cell-based.(package private) static byte[]format(int i) (package private) static org.apache.hadoop.hbase.io.ImmutableBytesWritableformat(int i, org.apache.hadoop.hbase.io.ImmutableBytesWritable w) private StringgetCipherName(org.apache.hadoop.conf.Configuration conf, String cipherName) static voidprotected voidrunBenchmark(HFilePerformanceEvaluation.RowOrientedBenchmark benchmark, int rowCount, String codec, String cipher) private voidAdd any supported codec or cipher to test the HFile read/write performance.private voidrunReadBenchmark(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 HFileprivate voidrunWriteBenchmark(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path mf, String codec, String cipher) Write a test HFile with the given codec & cipher
-
Field Details
-
ROW_LENGTH
- See Also:
-
ROW_COUNT
- See Also:
-
RFILE_BLOCKSIZE
- See Also:
-
testSummary
-
LOG
-
-
Constructor Details
-
HFilePerformanceEvaluation
public HFilePerformanceEvaluation()
-
-
Method Details
-
format
-
format
static org.apache.hadoop.hbase.io.ImmutableBytesWritable format(int i, org.apache.hadoop.hbase.io.ImmutableBytesWritable w) -
createCell
-
createCell
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
-
createCell
-
runBenchmarks
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
- Throws:
Exception
-
getCipherName
-