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.Logger
private static int
private static Collection<Long>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
private static void
fillArray
(byte[] bb, byte b) private static void
fillBB
(ByteBuffer bb, byte b) void
setUp()
Create an array with sample data.static void
void
Test if we are comparing equal bytes.void
void
Test 7-bit encoding of integers.private static void
testCompressedInt
(int value) void
void
void
Test copying from buffer.void
void
private void
testCopyFromSrcToDestWithThreads
(Object input, Object output, List<Integer> lengthes, List<Integer> offsets) void
Test copying data from stream.void
Test copying to stream from buffer with offset.void
void
void
Test how much bytes we need to store integer.void
Test how much bytes we need to store long.void
Test copying to stream from buffer.void
Test serializing int to bytesprivate static void
testPutInt
(int value) void
void
void
void
void
-
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
-