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
Modifier and TypeFieldDescriptionprivate static final double
private org.apache.hadoop.hbase.io.hfile.CacheConfig
private org.apache.hadoop.conf.Configuration
static int
Default number of seeks which will be used in benchmark.private static final double
private int
private Random
private final HBaseTestingUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
static void
Command line interface:private List<org.apache.hadoop.hbase.ExtendedCell>
prepareListOfTestSeeks
(org.apache.hadoop.fs.Path path) private static void
private void
runTest
(org.apache.hadoop.fs.Path path, org.apache.hadoop.hbase.io.encoding.DataBlockEncoding blockEncoding, List<org.apache.hadoop.hbase.ExtendedCell> seeks) void
runTests
(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.ExtendedCell> 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.ExtendedCell> 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
-