use of com.navercorp.pinpoint.thrift.io.HeaderTBaseSerializerFactory in project pinpoint by naver.
the class SpanStreamSendDataPlaner method getSpanChunkBuffer0.
private byte[] getSpanChunkBuffer0() {
if (spanChunkBuffer == null) {
final TSpanChunk spanChunk = toSpanChunk(span);
HeaderTBaseSerializer serializer = new HeaderTBaseSerializerFactory(false, SpanStreamSendDataFactory.DEFAULT_UDP_MAX_BUFFER_SIZE, false).createSerializer();
byte[] spanChunkBuffer;
try {
spanChunkBuffer = serializer.serialize(spanChunk);
this.spanChunkBuffer = spanChunkBuffer;
this.spanChunkSize = serializer.getInterBufferSize();
} catch (TException e) {
logger.warn("Spanchunk serializer failed. {}.", spanChunk);
}
}
if (spanChunkBuffer == null) {
return new byte[0];
}
return spanChunkBuffer;
}
use of com.navercorp.pinpoint.thrift.io.HeaderTBaseSerializerFactory in project pinpoint by naver.
the class HeaderTBaseDeserializerFactoryTest method optionTest2.
@Test
public void optionTest2() {
HeaderTBaseSerializerFactory factory = new HeaderTBaseSerializerFactory(true, 1);
Assert.assertTrue(factory.isSafetyGuaranteed());
}
use of com.navercorp.pinpoint.thrift.io.HeaderTBaseSerializerFactory in project pinpoint by naver.
the class HeaderTBaseDeserializerFactoryTest method optionTest.
@Test
public void optionTest() {
HeaderTBaseSerializerFactory factory = new HeaderTBaseSerializerFactory(false, 1);
Assert.assertFalse(factory.isSafetyGuaranteed());
}
use of com.navercorp.pinpoint.thrift.io.HeaderTBaseSerializerFactory in project pinpoint by naver.
the class HeaderTBaseSerializerTest method testSerialize2.
@Test
public void testSerialize2() throws Exception {
HeaderTBaseSerializer serializer = new HeaderTBaseSerializerFactory().createSerializer();
HeaderTBaseDeserializer deserializer = new HeaderTBaseDeserializerFactory().createDeserializer();
test(serializer, deserializer);
}
use of com.navercorp.pinpoint.thrift.io.HeaderTBaseSerializerFactory in project pinpoint by naver.
the class HeaderTBaseSerializerTest method testSerialize1.
@Test
public void testSerialize1() throws Exception {
HeaderTBaseSerializer serializer = new HeaderTBaseSerializerFactory(false).createSerializer();
HeaderTBaseDeserializer deserializer = new HeaderTBaseDeserializerFactory().createDeserializer();
test(serializer, deserializer);
}
Aggregations