Package org.apache.hadoop.hbase.util
Class TestByteBufferUtils
java.lang.Object
org.apache.hadoop.hbase.util.TestByteBufferUtils
-
Field Summary
Modifier and TypeFieldDescriptionprivate byte[]
static final HBaseClassTestRule
private static final int
private static final Collection<Long>
private static final String
private static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
static void
(package private) static void
(package private) static void
private static void
fillArray
(byte[] bb, byte b) private static void
fillBB
(ByteBuffer bb, byte b) static Collection<Object[]>
private static void
void
setUp()
Create an array with sample data.void
Test if we are comparing equal bytes.void
void
Test 7-bit encoding of integers.private 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 void
testPutInt
(int value) void
void
void
void
void
-
Field Details
-
CLASS_RULE
-
UNSAFE_AVAIL_NAME
- See Also:
-
UNSAFE_UNALIGNED_NAME
- See Also:
-
array
-
MAX_VLONG_LENGTH
- See Also:
-
testNumbers
-
-
Constructor Details
-
TestByteBufferUtils
- Throws:
Exception
-
-
Method Details
-
afterClass
- Throws:
Exception
-
parameters
-
setUnsafe
- Throws:
Exception
-
disableUnsafe
- Throws:
Exception
-
detectAvailabilityOfUnsafe
- Throws:
Exception
-
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 -
testCompressedInt
- Throws:
IOException
-
testPutInt
-
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
-
fillBB
-
fillArray
-