Package org.apache.hadoop.hbase.util
Class ByteBufferUtilsTestBase
java.lang.Object
org.apache.hadoop.hbase.util.ByteBufferUtilsTestBase
- Direct Known Subclasses:
TestByteBufferUtils,TestByteBufferUtilsWoUnsafe
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]private static final org.slf4j.Loggerprivate static intprivate static Collection<Long> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidprivate static voidfillArray(byte[] bb, byte b) private static voidfillBB(ByteBuffer bb, byte b) voidsetUp()Create an array with sample data.static voidvoidTest if we are comparing equal bytes.voidvoidTest 7-bit encoding of integers.private static voidtestCompressedInt(int value) voidvoidvoidTest copying from buffer.voidvoidprivate voidtestCopyFromSrcToDestWithThreads(Object input, Object output, List<Integer> lengthes, List<Integer> offsets) voidTest copying data from stream.voidTest copying to stream from buffer with offset.voidvoidvoidTest how much bytes we need to store integer.voidTest how much bytes we need to store long.voidTest copying to stream from buffer.voidTest serializing int to bytesprivate static voidtestPutInt(int value) voidvoidvoidvoidvoid
-
Field Details
-
LOG
-
MAX_VLONG_LENGTH
-
testNumbers
-
array
-
-
Constructor Details
-
ByteBufferUtilsTestBase
public ByteBufferUtilsTestBase()
-
-
Method Details
-
setUpBeforeAll
-
setUp
Create an array with sample data. -
addNumber
-
testReadWriteVLong
-
testReadWriteConsecutiveVLong
-
testConsistencyWithHadoopVLong
- Throws:
IOException
-
testMoveBufferToStream
Test copying to stream from buffer.- Throws:
IOException
-
testCopyToStreamWithOffset
Test copying to stream from buffer with offset.- Throws:
IOException- On test failure.
-
testCopyFromStream
Test copying data from stream.- Throws:
IOException- On test failure.
-
testCopyFromBuffer
Test copying from buffer. -
testCompressedInt
Test 7-bit encoding of integers.- Throws:
IOException- On test failure.
-
testIntFitsIn
Test how much bytes we need to store integer. -
testLongFitsIn
Test how much bytes we need to store long. -
testArePartEqual
Test if we are comparing equal bytes. -
testPutInt
Test serializing int to bytes -
testToBytes
-
testToPrimitiveTypes
-
testCopyFromArrayToBuffer
-
testCopyFromSrcToDestWithThreads
private void testCopyFromSrcToDestWithThreads(Object input, Object output, List<Integer> lengthes, List<Integer> offsets) throws InterruptedException - Throws:
InterruptedException
-
testCopyFromSrcToDestWithThreads
- Throws:
InterruptedException
-
testCopyFromBufferToArray
-
testRelativeCopyFromBuffertoBuffer
-
testCompareTo
-
testEquals
-
testFindCommonPrefix
-
testCompressedInt
- Throws:
IOException
-
testPutInt
-
fillBB
-
fillArray
-