use of com.navercorp.pinpoint.thrift.io.HeaderTBaseSerializer in project pinpoint by naver.
the class SpanStreamSendDataPlanerTest method setUp.
@BeforeClass
public static void setUp() {
HeaderTBaseSerializerPoolFactory serializerFactory = new HeaderTBaseSerializerPoolFactory(true, 1000, true);
objectPool = new ObjectPool<HeaderTBaseSerializer>(serializerFactory, 16);
}
use of com.navercorp.pinpoint.thrift.io.HeaderTBaseSerializer 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.HeaderTBaseSerializer 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.HeaderTBaseSerializer 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);
}
use of com.navercorp.pinpoint.thrift.io.HeaderTBaseSerializer in project pinpoint by naver.
the class TcpDataSenderProvider method get.
@Override
public EnhancedDataSender<MetaDataType> get() {
PinpointClientFactory clientFactory = clientFactoryProvider.get();
String collectorTcpServerIp = thriftTransportConfig.getCollectorTcpServerIp();
int collectorTcpServerPort = thriftTransportConfig.getCollectorTcpServerPort();
HeaderTBaseSerializer headerTBaseSerializer = tBaseSerializerProvider.get();
MessageSerializer<MetaDataType, byte[]> messageSerializer = new ThriftMessageSerializer<>(messageConverter, headerTBaseSerializer);
return new TcpDataSender<>("Default", collectorTcpServerIp, collectorTcpServerPort, clientFactory, messageSerializer);
}
Aggregations