mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-15 07:46:19 +10:00
[강운덕] [LUCYSUS-1744] hbase 저장시의 데이터를 컴팩트하게 함.
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-commons/trunk@803 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package com.profiler.common.bo;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class AnnotationBoTest {
|
||||
@Test
|
||||
public void testGetVersion() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetVersion() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWriteValue() throws Exception {
|
||||
AnnotationBo bo = new AnnotationBo();
|
||||
bo.setKey("test");
|
||||
bo.setValue("value".getBytes("UTF-8"));
|
||||
int bufferSize = bo.getBufferSize();
|
||||
byte[] bytes = new byte[bufferSize];
|
||||
bo.writeValue(bytes, 0);
|
||||
|
||||
AnnotationBo bo2 = new AnnotationBo();
|
||||
bo2.readValue(bytes, 0);
|
||||
Assert.assertEquals(bo.getKey(), bo2.getKey());
|
||||
Assert.assertEquals(bo.getDuration(), bo2.getDuration());
|
||||
Assert.assertEquals(bo.getTimestamp(), bo2.getTimestamp());
|
||||
Assert.assertEquals(bo.getValueType(), bo2.getValueType());
|
||||
Assert.assertArrayEquals(bo.getValue(), bo2.getValue());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user