Search in sources :

Example 1 with ThriftMessageSerializer

use of com.navercorp.pinpoint.profiler.sender.ThriftMessageSerializer 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);
}
Also used : HeaderTBaseSerializer(com.navercorp.pinpoint.thrift.io.HeaderTBaseSerializer) ThriftMessageSerializer(com.navercorp.pinpoint.profiler.sender.ThriftMessageSerializer) PinpointClientFactory(com.navercorp.pinpoint.rpc.client.PinpointClientFactory) MetaDataType(com.navercorp.pinpoint.profiler.metadata.MetaDataType) TcpDataSender(com.navercorp.pinpoint.profiler.sender.TcpDataSender)

Example 2 with ThriftMessageSerializer

use of com.navercorp.pinpoint.profiler.sender.ThriftMessageSerializer in project pinpoint by naver.

the class SpanDataSenderProvider method get.

@Override
public DataSender<SpanType> get() {
    if ("TCP".equalsIgnoreCase(transportType)) {
        if ("OIO".equalsIgnoreCase(ioType)) {
            logger.warn("TCP transport not support OIO type.(only support NIO)");
        }
        PinpointClientFactory pinpointClientFactory = clientFactoryProvider.get();
        MessageSerializer<SpanType, byte[]> messageSerializer = new ThriftMessageSerializer<>(messageConverter);
        return new TcpDataSender<>("SpanDataSender", ip, port, pinpointClientFactory, messageSerializer, writeQueueSize);
    } else {
        UdpDataSenderFactory<SpanType> factory = new UdpDataSenderFactory<>(ip, port, UDP_EXECUTOR_NAME, writeQueueSize, timeout, sendBufferSize, messageConverter);
        return factory.create(ioType);
    }
}
Also used : SpanType(com.navercorp.pinpoint.profiler.context.SpanType) ThriftMessageSerializer(com.navercorp.pinpoint.profiler.sender.ThriftMessageSerializer) PinpointClientFactory(com.navercorp.pinpoint.rpc.client.PinpointClientFactory) TcpDataSender(com.navercorp.pinpoint.profiler.sender.TcpDataSender) UdpDataSenderFactory(com.navercorp.pinpoint.profiler.sender.UdpDataSenderFactory)

Example 3 with ThriftMessageSerializer

use of com.navercorp.pinpoint.profiler.sender.ThriftMessageSerializer in project pinpoint by naver.

the class StatDataSenderProvider method get.

@Override
public DataSender<MetricType> get() {
    if ("TCP".equalsIgnoreCase(transportType)) {
        if ("OIO".equalsIgnoreCase(ioType)) {
            logger.warn("TCP transport not support OIO type.(only support NIO)");
        }
        PinpointClientFactory pinpointClientFactory = clientFactoryProvider.get();
        MessageSerializer<MetricType, byte[]> messageSerializer = new ThriftMessageSerializer<>(messageConverter);
        return new TcpDataSender<>("StatDataSender", ip, port, pinpointClientFactory, messageSerializer, writeQueueSize);
    } else {
        UdpDataSenderFactory<MetricType> factory = new UdpDataSenderFactory<>(ip, port, UDP_EXECUTOR_NAME, writeQueueSize, timeout, sendBufferSize, messageConverter);
        return factory.create(ioType);
    }
}
Also used : ThriftMessageSerializer(com.navercorp.pinpoint.profiler.sender.ThriftMessageSerializer) PinpointClientFactory(com.navercorp.pinpoint.rpc.client.PinpointClientFactory) MetricType(com.navercorp.pinpoint.profiler.monitor.metric.MetricType) TcpDataSender(com.navercorp.pinpoint.profiler.sender.TcpDataSender) UdpDataSenderFactory(com.navercorp.pinpoint.profiler.sender.UdpDataSenderFactory)

Aggregations

TcpDataSender (com.navercorp.pinpoint.profiler.sender.TcpDataSender)3 ThriftMessageSerializer (com.navercorp.pinpoint.profiler.sender.ThriftMessageSerializer)3 PinpointClientFactory (com.navercorp.pinpoint.rpc.client.PinpointClientFactory)3 UdpDataSenderFactory (com.navercorp.pinpoint.profiler.sender.UdpDataSenderFactory)2 SpanType (com.navercorp.pinpoint.profiler.context.SpanType)1 MetaDataType (com.navercorp.pinpoint.profiler.metadata.MetaDataType)1 MetricType (com.navercorp.pinpoint.profiler.monitor.metric.MetricType)1 HeaderTBaseSerializer (com.navercorp.pinpoint.thrift.io.HeaderTBaseSerializer)1