Package org.apache.hadoop.hbase.io.hfile
Class TestBlockIOUtils
java.lang.Object
org.apache.hadoop.hbase.io.hfile.TestBlockIOUtils
@Tag("org.apache.hadoop.hbase.testclassification.IOTests") @Tag("org.apache.hadoop.hbase.testclassification.SmallTests")
public class TestBlockIOUtils
extends Object
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.hadoop.hbase.io.compress.Compression.Algorithmprivate Stringprivate static final intprivate static io.opentelemetry.sdk.testing.junit5.OpenTelemetryExtensionprivate static final HBaseTestingUtil -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voiddeleteFile(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) private booleanDetermine if ByteBufferPositionedReadable API is available .private voidreadDataBlocksAndVerify(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.hbase.io.compress.Compression.Algorithm compressAlgo, long totalDataBlockBytes) voidsetUp(org.junit.jupiter.api.TestInfo testInfo) voidvoidvoidvoidvoidvoidvoidvoidvoidprivate voidtestPreadReadFullBytesInternal(boolean readAllBytes, long randomSeed) voidvoidvoidvoidprivate longwriteBlocks(org.apache.hadoop.conf.Configuration conf, Random rand, org.apache.hadoop.hbase.io.compress.Compression.Algorithm compressAlgo, org.apache.hadoop.fs.Path path)
-
Field Details
-
methodName
-
OTEL_EXT
@RegisterExtension private static io.opentelemetry.sdk.testing.junit5.OpenTelemetryExtension OTEL_EXT -
TEST_UTIL
-
NUM_TEST_BLOCKS
- See Also:
-
COMPRESSION_ALGO
-
-
Constructor Details
-
TestBlockIOUtils
public TestBlockIOUtils()
-
-
Method Details
-
setUp
-
testIsByteBufferReadable
- Throws:
IOException
-
testReadFully
- Throws:
IOException
-
testPreadWithReadFullBytes
- Throws:
IOException
-
testPreadWithoutReadFullBytes
- Throws:
IOException
-
testPreadReadFullBytesInternal
private void testPreadReadFullBytesInternal(boolean readAllBytes, long randomSeed) throws IOException - Throws:
IOException
-
writeBlocks
private long writeBlocks(org.apache.hadoop.conf.Configuration conf, Random rand, org.apache.hadoop.hbase.io.compress.Compression.Algorithm compressAlgo, org.apache.hadoop.fs.Path path) throws IOException - Throws:
IOException
-
readDataBlocksAndVerify
private void readDataBlocksAndVerify(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.hbase.io.compress.Compression.Algorithm compressAlgo, long totalDataBlockBytes) throws IOException - Throws:
IOException
-
deleteFile
private void deleteFile(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) throws IOException - Throws:
IOException
-
testReadWithExtra
- Throws:
IOException
-
testPositionalReadNoExtra
- Throws:
IOException
-
testPositionalReadShortReadOfNecessaryBytes
- Throws:
IOException
-
testPositionalReadExtraSucceeded
- Throws:
IOException
-
testPositionalReadExtraFailed
- Throws:
IOException
-
testPositionalReadShortReadCompletesNecessaryAndExtraBytes
- Throws:
IOException
-
testPositionalReadPrematureEOF
- Throws:
IOException
-
isByteBufferPositionedReadable
Determine if ByteBufferPositionedReadable API is available .- Returns:
- true if FSDataInputStream implements ByteBufferPositionedReadable API.
-
testByteBufferPositionedReadable
- Throws:
IOException
-
testByteBufferPositionedReadableEOF
- Throws:
IOException
-