@InterfaceAudience.LimitedPrivate(value="Tools") public class HFilePerformanceEvaluation extends Object
HFile
.Modifier and Type | Class and Description |
---|---|
(package private) static class |
HFilePerformanceEvaluation.GaussianRandomReadBenchmark |
(package private) static class |
HFilePerformanceEvaluation.ReadBenchmark |
(package private) static class |
HFilePerformanceEvaluation.RowOrientedBenchmark |
(package private) static class |
HFilePerformanceEvaluation.SequentialReadBenchmark |
(package private) static class |
HFilePerformanceEvaluation.SequentialWriteBenchmark |
(package private) static class |
HFilePerformanceEvaluation.UniformRandomReadBenchmark |
(package private) static class |
HFilePerformanceEvaluation.UniformRandomSmallScan |
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
private static int |
RFILE_BLOCKSIZE |
private static int |
ROW_COUNT |
private static int |
ROW_LENGTH |
private static StringBuilder |
testSummary |
Constructor and Description |
---|
HFilePerformanceEvaluation() |
Modifier and Type | Method and Description |
---|---|
(package private) static org.apache.hadoop.hbase.Cell |
createCell(byte[] keyRow) |
(package private) static org.apache.hadoop.hbase.Cell |
createCell(byte[] keyRow,
byte[] value) |
(package private) static org.apache.hadoop.hbase.Cell |
createCell(int i) |
(package private) static org.apache.hadoop.hbase.Cell |
createCell(int i,
byte[] value)
HFile is Cell-based.
|
(package private) static byte[] |
format(int i) |
(package private) static org.apache.hadoop.hbase.io.ImmutableBytesWritable |
format(int i,
org.apache.hadoop.hbase.io.ImmutableBytesWritable w) |
private String |
getCipherName(org.apache.hadoop.conf.Configuration conf,
String cipherName) |
static void |
main(String[] args) |
protected void |
runBenchmark(HFilePerformanceEvaluation.RowOrientedBenchmark benchmark,
int rowCount,
String codec,
String cipher) |
private void |
runBenchmarks()
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 HFile
|
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)
Write a test HFile with the given codec & cipher
|
private static final int ROW_LENGTH
private static final int ROW_COUNT
private static final int RFILE_BLOCKSIZE
private static StringBuilder testSummary
private static final org.slf4j.Logger LOG
public HFilePerformanceEvaluation()
static byte[] format(int i)
static org.apache.hadoop.hbase.io.ImmutableBytesWritable format(int i, org.apache.hadoop.hbase.io.ImmutableBytesWritable w)
static org.apache.hadoop.hbase.Cell createCell(int i)
static org.apache.hadoop.hbase.Cell createCell(int i, byte[] value)
i
- Integer to format as a row Key.value
- Value to usestatic org.apache.hadoop.hbase.Cell createCell(byte[] keyRow)
static org.apache.hadoop.hbase.Cell createCell(byte[] keyRow, byte[] value)
private void runBenchmarks() throws Exception
Exception
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
conf
- fs
- mf
- codec
- "none", "lzo", "gz", "snappy"cipher
- "none", "aes"Exception
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)
conf
- fs
- mf
- codec
- "none", "lzo", "gz", "snappy"cipher
- "none", "aes"protected void runBenchmark(HFilePerformanceEvaluation.RowOrientedBenchmark benchmark, int rowCount, String codec, String cipher) throws Exception
Exception
public static void main(String[] args) throws Exception
args
- Exception
IOException
private String getCipherName(org.apache.hadoop.conf.Configuration conf, String cipherName)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.