Search in sources :

Example 1 with TStringMetaData

use of com.navercorp.pinpoint.thrift.dto.TStringMetaData in project pinpoint by naver.

the class TestTcpDataSender method addData.

private void addData(TBase<?, ?> data) {
    if (data instanceof TApiMetaData) {
        TApiMetaData md = (TApiMetaData) data;
        final String javaMethodDescriptor = toJavaMethodDescriptor(md);
        apiIdMap.put(md.getApiId(), javaMethodDescriptor);
    } else if (data instanceof TSqlMetaData) {
        TSqlMetaData md = (TSqlMetaData) data;
        int id = md.getSqlId();
        String sql = md.getSql();
        sqlIdMap.put(id, sql);
    } else if (data instanceof TStringMetaData) {
        TStringMetaData md = (TStringMetaData) data;
        int id = md.getStringId();
        String string = md.getStringValue();
        stringIdMap.put(id, string);
    }
    datas.add(data);
}
Also used : TApiMetaData(com.navercorp.pinpoint.thrift.dto.TApiMetaData) TSqlMetaData(com.navercorp.pinpoint.thrift.dto.TSqlMetaData) TStringMetaData(com.navercorp.pinpoint.thrift.dto.TStringMetaData)

Example 2 with TStringMetaData

use of com.navercorp.pinpoint.thrift.dto.TStringMetaData in project pinpoint by naver.

the class DefaultStringMetaDataService method cacheString.

@Override
public int cacheString(final String value) {
    if (value == null) {
        return 0;
    }
    final Result result = this.stringCache.put(value);
    if (result.isNewValue()) {
        final TStringMetaData stringMetaData = new TStringMetaData();
        stringMetaData.setAgentId(agentId);
        stringMetaData.setAgentStartTime(agentStartTime);
        stringMetaData.setStringId(result.getId());
        stringMetaData.setStringValue(value);
        this.enhancedDataSender.request(stringMetaData);
    }
    return result.getId();
}
Also used : TStringMetaData(com.navercorp.pinpoint.thrift.dto.TStringMetaData)

Aggregations

TStringMetaData (com.navercorp.pinpoint.thrift.dto.TStringMetaData)2 TApiMetaData (com.navercorp.pinpoint.thrift.dto.TApiMetaData)1 TSqlMetaData (com.navercorp.pinpoint.thrift.dto.TSqlMetaData)1