Class EncodedSeekPerformanceTest
java.lang.Object
org.apache.hadoop.hbase.regionserver.EncodedSeekPerformanceTest
Test seek performance for encoded data blocks. Read an HFile and do several random seeks.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final doubleprivate org.apache.hadoop.hbase.io.hfile.CacheConfigprivate org.apache.hadoop.conf.Configurationstatic intDefault number of seeks which will be used in benchmark.private static final doubleprivate intprivate Randomprivate final HBaseTestingUtility -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidstatic voidCommand line interface:private List<org.apache.hadoop.hbase.Cell>prepareListOfTestSeeks(org.apache.hadoop.fs.Path path) private static voidprivate voidrunTest(org.apache.hadoop.fs.Path path, org.apache.hadoop.hbase.io.encoding.DataBlockEncoding blockEncoding, List<org.apache.hadoop.hbase.Cell> seeks) voidrunTests(org.apache.hadoop.fs.Path path, org.apache.hadoop.hbase.io.encoding.DataBlockEncoding[] encodings)
-
Field Details
-
NANOSEC_IN_SEC
- See Also:
-
BYTES_IN_MEGABYTES
- See Also:
-
DEFAULT_NUMBER_OF_SEEKS
Default number of seeks which will be used in benchmark. -
testingUtility
-
configuration
-
cacheConf
-
randomizer
-
numberOfSeeks
-
-
Constructor Details
-
EncodedSeekPerformanceTest
public EncodedSeekPerformanceTest()Use this benchmark with default options
-
-
Method Details
-
prepareListOfTestSeeks
private List<org.apache.hadoop.hbase.Cell> prepareListOfTestSeeks(org.apache.hadoop.fs.Path path) throws IOException - Throws:
IOException
-
runTest
private void runTest(org.apache.hadoop.fs.Path path, org.apache.hadoop.hbase.io.encoding.DataBlockEncoding blockEncoding, List<org.apache.hadoop.hbase.Cell> seeks) throws IOException - Throws:
IOException
-
runTests
public void runTests(org.apache.hadoop.fs.Path path, org.apache.hadoop.hbase.io.encoding.DataBlockEncoding[] encodings) throws IOException - Parameters:
path- Path to the HFile which will be used.encodings- the data block encoding algorithms to use- Throws:
IOException- if there is a bug while reading from disk
-
main
Command line interface:- Parameters:
args- Takes one argument - file size.- Throws:
IOException- if there is a bug while reading from disk
-
printUsage
-
clearBlockCache
-