Class TestGzipByteBuffDecompressor
java.lang.Object
org.apache.hadoop.hbase.io.compress.TestGzipByteBuffDecompressor
@Tag("org.apache.hadoop.hbase.testclassification.SmallTests")
public class TestGzipByteBuffDecompressor
extends Object
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidGzipByteBuffDecompressor is backed by Hadoop's native zlib binding, so actually decompressing anything requires that native library to be loaded on this JVM.private static byte[]concat(byte[] first, byte[] second) private static org.apache.hadoop.hbase.nio.ByteBuffdirectBuffWith(byte[] data) private static byte[]private static org.apache.hadoop.hbase.nio.ByteBuffheapBuffWith(byte[] data) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidThis is the exact gateHFileBlockDefaultDecodingContext#canDecompressViaByteBuffrelies on to decide between ByteBuff decompression and the stream path, driven end-to-end from theGzipHFileDecompressionContext#ALLOW_BYTE_BUFF_DECOMPRESSION_KEYconfig flag.voidvoidvoidvoid
-
Field Details
-
COMPRESSED_PAYLOAD
-
-
Constructor Details
-
TestGzipByteBuffDecompressor
public TestGzipByteBuffDecompressor()
-
-
Method Details
-
assumeNativeZlibLoaded
GzipByteBuffDecompressor is backed by Hadoop's native zlib binding, so actually decompressing anything requires that native library to be loaded on this JVM. -
itReportsCorrectCapabilitiesWithoutNativeZlib
-
itReportsCorrectCapabilitiesWithNativeZlib
-
directBuffWith
-
heapBuffWith
-
gzip
-
concat
-
itDecompressesDirectToDirectSuccessfully
- Throws:
IOException
-
itDecompressDirectFailsOnTooShortInput
- Throws:
IOException
-
itDecompressDirectFailsOnBadMagicBytes
- Throws:
IOException
-
itDecompressDirectFailsWhenOutputBufferTooSmall
- Throws:
IOException
-
itDecompressDirectFailsOnCorruptedCrc32
- Throws:
IOException
-
itDecompressDirectFailsOnCorruptedIsize
- Throws:
IOException
-
itDecompressesDirectSuccessfullyOnRepeatedCalls
- Throws:
IOException
-
itDecompressDirectIsStillUsableAfterAPreviousCallThrows
- Throws:
IOException
-
itDecompressesDirectToDirectWithNonZeroBufferPosition
- Throws:
IOException
-
itDecompressDirectFailsOnTruncatedGzipStream
- Throws:
IOException
-
itDecompressesOnlyTheDelimitedMemberFromAMultiMemberPayload
- Throws:
IOException
-
itReinitControlsByteBuffDecompressionViaConfigFlag
This is the exact gateHFileBlockDefaultDecodingContext#canDecompressViaByteBuffrelies on to decide between ByteBuff decompression and the stream path, driven end-to-end from theGzipHFileDecompressionContext#ALLOW_BYTE_BUFF_DECOMPRESSION_KEYconfig flag. -
itReinitWithNullContextIsNoOp
-
itReinitFailsOnWrongContextType
-
itDecompressThrowsWhenPassedAMultiByteBuff
- Throws:
IOException
-