Class TestBytesReadServerSideScanMetrics
java.lang.Object
org.apache.hadoop.hbase.regionserver.TestBytesReadServerSideScanMetrics
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]static final HBaseClassTestRuleprivate org.apache.hadoop.conf.Configurationprivate static final byte[]private static final org.slf4j.Loggerorg.junit.rules.TestNameprivate static final byte[]private static final byte[]private static final byte[]private HBaseTestingUtilprivate static final byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidassertBlockCacheWarmUp(org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.KeyValue keyValue) private voidassertBlockIsCached(org.apache.hadoop.hbase.io.hfile.HFile.Reader hfileReader, org.apache.hadoop.hbase.io.hfile.HFileBlock block, org.apache.hadoop.hbase.io.hfile.BlockCache blockCache) private voidassertBytesReadFromBlockCache(org.apache.hadoop.hbase.TableName tableName, long actualBytesReadFromBlockCache, org.apache.hadoop.hbase.KeyValue keyValue) private voidassertBytesReadFromFs(org.apache.hadoop.hbase.TableName tableName, long actualBytesReadFromFs, org.apache.hadoop.hbase.KeyValue keyValue, long actualReadOps) private org.apache.hadoop.hbase.client.ScancreateScanToReadOneRowAtATimeFromServer(byte[] startRow, byte[] stopRow) private voidcreateTable(org.apache.hadoop.hbase.TableName tableName, boolean blockCacheEnabled, org.apache.hadoop.hbase.regionserver.BloomType bloomType) private voidcreateTable(org.apache.hadoop.hbase.TableName tableName, boolean blockCacheEnabled, org.apache.hadoop.hbase.regionserver.BloomType bloomType, int blocksize, Map<String, String> configuration) private voidcreateTable(org.apache.hadoop.hbase.TableName tableName, boolean blockCacheEnabled, org.apache.hadoop.hbase.regionserver.BloomType bloomType, Map<String, String> configuration) private voidflushAndWaitUntilFlushed(org.apache.hadoop.hbase.TableName tableName, boolean waitForUpdatedReaders) private intgetBytesReadFromFsForNonGetScan(org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.client.metrics.ScanMetrics scanMetrics, int expectedStoreFileCount) private intgetBytesReadToReadConsecutiveDataBlocks(org.apache.hadoop.hbase.TableName tableName, int expectedStoreFileCount, int expectedDataBlockCount, boolean isReadFromFs) private org.apache.hadoop.hbase.client.metrics.ScanMetricsreadDataAndGetScanMetrics(org.apache.hadoop.hbase.TableName tableName, boolean isScanMetricsEnabled) private voidreadHFile(org.apache.hadoop.hbase.io.hfile.HFile.Reader hfileReader, org.apache.hadoop.hbase.io.hfile.CompoundBloomFilter cbf, org.apache.hadoop.hbase.KeyValue keyValue, Consumer<org.apache.hadoop.hbase.io.hfile.HFileBlock> bytesReadFunction) voidsetUp()voidvoidvoidvoidvoidvoidvoidvoidvoidTest consecutive calls to RegionScannerImpl.next() to make sure populating scan metrics from ThreadLocalServerSideScanMetrics is done correctly.voidprivate voidwriteData(org.apache.hadoop.hbase.TableName tableName, boolean shouldFlush)
-
Field Details
-
CLASS_RULE
-
name
-
LOG
-
UTIL
-
CF
-
CQ
-
VALUE
-
ROW2
-
ROW3
-
ROW4
-
conf
-
-
Constructor Details
-
TestBytesReadServerSideScanMetrics
public TestBytesReadServerSideScanMetrics()
-
-
Method Details
-
setUp
- Throws:
Exception
-
testScanMetricsDisabled
- Throws:
Exception
-
testBytesReadFromFsForSerialSeeks
- Throws:
Exception
-
testBytesReadFromFsForParallelSeeks
- Throws:
Exception
-
testBytesReadFromBlockCache
- Throws:
Exception
-
testBytesReadFromMemstore
- Throws:
Exception
-
testBytesReadWithSwitchFromPReadToStream
- Throws:
Exception
-
testBytesReadWhenFlushHappenedInTheMiddleOfScan
- Throws:
Exception
-
testBytesReadInReverseScan
- Throws:
Exception
-
testBytesReadWithLazySeek
- Throws:
Exception
-
testConsecutiveRegionScannerNextCalls
Test consecutive calls to RegionScannerImpl.next() to make sure populating scan metrics from ThreadLocalServerSideScanMetrics is done correctly.- Throws:
Exception
-
createScanToReadOneRowAtATimeFromServer
private org.apache.hadoop.hbase.client.Scan createScanToReadOneRowAtATimeFromServer(byte[] startRow, byte[] stopRow) -
flushAndWaitUntilFlushed
private void flushAndWaitUntilFlushed(org.apache.hadoop.hbase.TableName tableName, boolean waitForUpdatedReaders) throws Exception - Throws:
Exception
-
getBytesReadToReadConsecutiveDataBlocks
private int getBytesReadToReadConsecutiveDataBlocks(org.apache.hadoop.hbase.TableName tableName, int expectedStoreFileCount, int expectedDataBlockCount, boolean isReadFromFs) throws Exception - Throws:
Exception
-
getBytesReadFromFsForNonGetScan
private int getBytesReadFromFsForNonGetScan(org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.client.metrics.ScanMetrics scanMetrics, int expectedStoreFileCount) throws Exception - Throws:
Exception
-
readDataAndGetScanMetrics
private org.apache.hadoop.hbase.client.metrics.ScanMetrics readDataAndGetScanMetrics(org.apache.hadoop.hbase.TableName tableName, boolean isScanMetricsEnabled) throws Exception - Throws:
Exception
-
writeData
private void writeData(org.apache.hadoop.hbase.TableName tableName, boolean shouldFlush) throws Exception - Throws:
Exception
-
createTable
private void createTable(org.apache.hadoop.hbase.TableName tableName, boolean blockCacheEnabled, org.apache.hadoop.hbase.regionserver.BloomType bloomType) throws Exception - Throws:
Exception
-
createTable
private void createTable(org.apache.hadoop.hbase.TableName tableName, boolean blockCacheEnabled, org.apache.hadoop.hbase.regionserver.BloomType bloomType, Map<String, String> configuration) throws Exception- Throws:
Exception
-
createTable
private void createTable(org.apache.hadoop.hbase.TableName tableName, boolean blockCacheEnabled, org.apache.hadoop.hbase.regionserver.BloomType bloomType, int blocksize, Map<String, String> configuration) throws Exception- Throws:
Exception
-
assertBytesReadFromFs
private void assertBytesReadFromFs(org.apache.hadoop.hbase.TableName tableName, long actualBytesReadFromFs, org.apache.hadoop.hbase.KeyValue keyValue, long actualReadOps) throws Exception - Throws:
Exception
-
readHFile
private void readHFile(org.apache.hadoop.hbase.io.hfile.HFile.Reader hfileReader, org.apache.hadoop.hbase.io.hfile.CompoundBloomFilter cbf, org.apache.hadoop.hbase.KeyValue keyValue, Consumer<org.apache.hadoop.hbase.io.hfile.HFileBlock> bytesReadFunction) throws Exception - Throws:
Exception
-
assertBytesReadFromBlockCache
private void assertBytesReadFromBlockCache(org.apache.hadoop.hbase.TableName tableName, long actualBytesReadFromBlockCache, org.apache.hadoop.hbase.KeyValue keyValue) throws Exception - Throws:
Exception
-
assertBlockCacheWarmUp
private void assertBlockCacheWarmUp(org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.KeyValue keyValue) throws Exception - Throws:
Exception
-
assertBlockIsCached
private void assertBlockIsCached(org.apache.hadoop.hbase.io.hfile.HFile.Reader hfileReader, org.apache.hadoop.hbase.io.hfile.HFileBlock block, org.apache.hadoop.hbase.io.hfile.BlockCache blockCache)
-