Package org.apache.hadoop.hbase.io.hfile
Class TestPrefetch
java.lang.Object
org.apache.hadoop.hbase.io.hfile.TestPrefetch
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.hadoop.hbase.io.hfile.BlockCacheprivate org.apache.hadoop.hbase.io.hfile.CacheConfigstatic final HBaseClassTestRuleprivate org.apache.hadoop.conf.Configurationprivate static final intprivate org.apache.hadoop.fs.FileSystemprivate static final org.slf4j.Loggerprivate static final intprivate static final intio.opentelemetry.sdk.testing.junit4.OpenTelemetryRuleprivate static final HBaseTestingUtil -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.hadoop.hbase.KeyValue.TypegenerateKeyType(Random rand) private longgetElapsedTime(long startTime) private voidreadStoreFile(org.apache.hadoop.fs.Path storeFilePath) private voidreadStoreFile(org.apache.hadoop.fs.Path storeFilePath, BiFunction<org.apache.hadoop.hbase.io.hfile.HFile.Reader, Long, org.apache.hadoop.hbase.io.hfile.HFileBlock> readFunction, BiConsumer<org.apache.hadoop.hbase.io.hfile.BlockCacheKey, org.apache.hadoop.hbase.io.hfile.HFileBlock> validationFunction) private voidreadStoreFile(org.apache.hadoop.fs.Path storeFilePath, BiFunction<org.apache.hadoop.hbase.io.hfile.HFile.Reader, Long, org.apache.hadoop.hbase.io.hfile.HFileBlock> readFunction, BiConsumer<org.apache.hadoop.hbase.io.hfile.BlockCacheKey, org.apache.hadoop.hbase.io.hfile.HFileBlock> validationFunction, org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConfig) private voidreadStoreFileCacheOnly(org.apache.hadoop.fs.Path storeFilePath) private voidreadStoreFileLikeScanner(org.apache.hadoop.fs.Path storeFilePath) Read a storefile in the same manner as a scanner -- using non-positional reads and without waiting for prefetch to complete.voidsetUp()voidvoidvoidvoidvoidvoidvoidvoidvoidprivate voidtestPrefetchWhenHFileLink(Consumer<org.apache.hadoop.hbase.io.hfile.Cacheable> test) voidprivate voidtestPrefetchWhenRefs(boolean compactionEnabled, Consumer<org.apache.hadoop.hbase.io.hfile.Cacheable> test) voidprivate org.apache.hadoop.fs.PathwriteStoreFile(String fname) private org.apache.hadoop.fs.PathwriteStoreFile(String fname, org.apache.hadoop.hbase.io.hfile.HFileContext context) private org.apache.hadoop.fs.PathwriteStoreFile(String fname, org.apache.hadoop.hbase.io.hfile.HFileContext context, org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConfig) private org.apache.hadoop.hbase.util.Pair<org.apache.hadoop.fs.Path,byte[]> writeStoreFileForSplit(org.apache.hadoop.fs.Path storeDir, org.apache.hadoop.hbase.io.hfile.HFileContext context)
-
Field Details
-
LOG
-
CLASS_RULE
-
TEST_UTIL
-
NUM_VALID_KEY_TYPES
-
DATA_BLOCK_SIZE
- See Also:
-
NUM_KV
- See Also:
-
conf
-
cacheConf
-
fs
-
blockCache
-
otelRule
-
-
Constructor Details
-
TestPrefetch
public TestPrefetch()
-
-
Method Details
-
setUp
- Throws:
IOExceptionInterruptedException
-
testPrefetchSetInHCDWorks
-
testPrefetchBlockCacheDisabled
- Throws:
Exception
-
testPrefetchHeapUsageAboveThreshold
- Throws:
Exception
-
testPrefetch
- Throws:
Exception
-
testPrefetchRace
- Throws:
Exception
-
readStoreFileLikeScanner
Read a storefile in the same manner as a scanner -- using non-positional reads and without waiting for prefetch to complete.- Throws:
Exception
-
readStoreFile
- Throws:
Exception
-
readStoreFileCacheOnly
- Throws:
Exception
-
readStoreFile
private void readStoreFile(org.apache.hadoop.fs.Path storeFilePath, BiFunction<org.apache.hadoop.hbase.io.hfile.HFile.Reader, Long, throws Exceptionorg.apache.hadoop.hbase.io.hfile.HFileBlock> readFunction, BiConsumer<org.apache.hadoop.hbase.io.hfile.BlockCacheKey, org.apache.hadoop.hbase.io.hfile.HFileBlock> validationFunction) - Throws:
Exception
-
readStoreFile
private void readStoreFile(org.apache.hadoop.fs.Path storeFilePath, BiFunction<org.apache.hadoop.hbase.io.hfile.HFile.Reader, Long, throws Exceptionorg.apache.hadoop.hbase.io.hfile.HFileBlock> readFunction, BiConsumer<org.apache.hadoop.hbase.io.hfile.BlockCacheKey, org.apache.hadoop.hbase.io.hfile.HFileBlock> validationFunction, org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConfig) - Throws:
Exception
-
testPrefetchCompressed
- Throws:
Exception
-
testPrefetchDoesntSkipRefs
- Throws:
Exception
-
testOnConfigurationChange
-
testPrefetchWithDelay
- Throws:
Exception
-
testPrefetchWhenNoBlockCache
- Throws:
Exception
-
testPrefetchDoesntSkipHFileLink
- Throws:
Exception
-
testPrefetchWhenRefs
private void testPrefetchWhenRefs(boolean compactionEnabled, Consumer<org.apache.hadoop.hbase.io.hfile.Cacheable> test) throws Exception - Throws:
Exception
-
testPrefetchWhenHFileLink
private void testPrefetchWhenHFileLink(Consumer<org.apache.hadoop.hbase.io.hfile.Cacheable> test) throws Exception - Throws:
Exception
-
writeStoreFile
- Throws:
IOException
-
writeStoreFile
private org.apache.hadoop.fs.Path writeStoreFile(String fname, org.apache.hadoop.hbase.io.hfile.HFileContext context) throws IOException - Throws:
IOException
-
writeStoreFile
private org.apache.hadoop.fs.Path writeStoreFile(String fname, org.apache.hadoop.hbase.io.hfile.HFileContext context, org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConfig) throws IOException - Throws:
IOException
-
writeStoreFileForSplit
private org.apache.hadoop.hbase.util.Pair<org.apache.hadoop.fs.Path,byte[]> writeStoreFileForSplit(org.apache.hadoop.fs.Path storeDir, org.apache.hadoop.hbase.io.hfile.HFileContext context) throws IOException - Throws:
IOException
-
generateKeyType
-
getElapsedTime
-