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
Modifier 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
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private static final int
private static final int
private static final int
private static StringBuilder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) static ExtendedCell
createCell
(byte[] keyRow) (package private) static ExtendedCell
createCell
(byte[] keyRow, byte[] value) (package private) static ExtendedCell
createCell
(int i) (package private) static ExtendedCell
createCell
(int i, byte[] value) HFile is Cell-based.(package private) static byte[]
format
(int i) (package private) static ImmutableBytesWritable
format
(int i, ImmutableBytesWritable w) private String
getCipherName
(org.apache.hadoop.conf.Configuration conf, String cipherName) static void
protected void
runBenchmark
(HFilePerformanceEvaluation.RowOrientedBenchmark benchmark, int rowCount, String codec, String cipher) private void
Add any supported codec or cipher to test the HFile read/write performance.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 HFileprivate void
runWriteBenchmark
(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
-
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
-