Search in sources :

Example 6 with JoinDataSourceListBo

use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinDataSourceListBo in project pinpoint by naver.

the class JoinDataSourceSampler method sampleDataPoints.

@Override
public AggreJoinDataSourceListBo sampleDataPoints(int index, long timestamp, List<JoinDataSourceListBo> joinDataSourceListBoList, JoinDataSourceListBo previousJoinDataSourceListBo) {
    if (CollectionUtils.isEmpty(joinDataSourceListBoList)) {
        return AggreJoinDataSourceListBo.createUncollectedObject(timestamp);
    }
    JoinDataSourceListBo joinDataSourceListBo = JoinDataSourceListBo.joinDataSourceListBoList(joinDataSourceListBoList, timestamp);
    String id = joinDataSourceListBo.getId();
    List<JoinDataSourceBo> joinDataSourceBoList = joinDataSourceListBo.getJoinDataSourceBoList();
    List<JoinDataSourceBo> aggreJoinDataSourceBoList = getJoinDataSourceBoList(timestamp, joinDataSourceBoList);
    AggreJoinDataSourceListBo aggreJoinDataSourceListBo = new AggreJoinDataSourceListBo(id, aggreJoinDataSourceBoList, timestamp);
    return aggreJoinDataSourceListBo;
}
Also used : JoinDataSourceBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinDataSourceBo) AggreJoinDataSourceBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinDataSourceBo) AggreJoinDataSourceListBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinDataSourceListBo) AggreJoinDataSourceListBo(com.navercorp.pinpoint.web.vo.stat.AggreJoinDataSourceListBo) JoinDataSourceListBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinDataSourceListBo)

Example 7 with JoinDataSourceListBo

use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinDataSourceListBo in project pinpoint by naver.

the class DataSourceCodecTest method createJoinDataSourceListBoList.

private List<JoinStatBo> createJoinDataSourceListBoList(long currentTime) {
    final String id = "test_app";
    List<JoinStatBo> joinDataSourceListBoList = new ArrayList<>();
    JoinDataSourceListBo joinDataSourceListBo1 = new JoinDataSourceListBo(id, createJoinDataSourceBoList(10), currentTime);
    JoinDataSourceListBo joinDataSourceListBo2 = new JoinDataSourceListBo(id, createJoinDataSourceBoList(20), currentTime + 5000);
    JoinDataSourceListBo joinDataSourceListBo3 = new JoinDataSourceListBo(id, createJoinDataSourceBoList(30), currentTime + 10000);
    JoinDataSourceListBo joinDataSourceListBo4 = new JoinDataSourceListBo(id, createJoinDataSourceBoList(40), currentTime + 15000);
    JoinDataSourceListBo joinDataSourceListBo5 = new JoinDataSourceListBo(id, createJoinDataSourceBoList(50), currentTime + 20000);
    joinDataSourceListBoList.add(joinDataSourceListBo1);
    joinDataSourceListBoList.add(joinDataSourceListBo2);
    joinDataSourceListBoList.add(joinDataSourceListBo3);
    joinDataSourceListBoList.add(joinDataSourceListBo4);
    joinDataSourceListBoList.add(joinDataSourceListBo5);
    return joinDataSourceListBoList;
}
Also used : ArrayList(java.util.ArrayList) JoinStatBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinStatBo) JoinDataSourceListBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinDataSourceListBo)

Example 8 with JoinDataSourceListBo

use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinDataSourceListBo in project pinpoint by naver.

the class DataSourceCodec method encodeTimestamps.

private void encodeTimestamps(Buffer valueBuffer, List<JoinDataSourceListBo> joinDataSourceListBoList) {
    List<Long> timestamps = new ArrayList<Long>(joinDataSourceListBoList.size());
    for (JoinDataSourceListBo joinDataSourceListBo : joinDataSourceListBoList) {
        timestamps.add(joinDataSourceListBo.getTimestamp());
    }
    codec.encodeTimestamps(valueBuffer, timestamps);
}
Also used : ArrayList(java.util.ArrayList) JoinDataSourceListBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinDataSourceListBo)

Example 9 with JoinDataSourceListBo

use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinDataSourceListBo in project pinpoint by naver.

the class JoinDataSourceListBoMapperTest method map2Test.

@Test
public void map2Test() {
    JoinDataSourceListBoMapper mapper = new JoinDataSourceListBoMapper();
    TFAgentStat tFAgentStat = new TFAgentStat();
    tFAgentStat.setAgentId("testAgent");
    tFAgentStat.setTimestamp(1491274138454L);
    JoinDataSourceListBo joinDataSourceListBo = mapper.map(tFAgentStat);
    assertEquals(joinDataSourceListBo, JoinDataSourceListBo.EMPTY_JOIN_DATA_SOURCE_LIST_BO);
    TFDataSourceList tFDataSourceList = new TFDataSourceList();
    tFAgentStat.setDataSourceList(tFDataSourceList);
    joinDataSourceListBo = mapper.map(tFAgentStat);
    assertEquals(joinDataSourceListBo, JoinDataSourceListBo.EMPTY_JOIN_DATA_SOURCE_LIST_BO);
    List<TFDataSource> dataSourceList = new ArrayList<>();
    tFDataSourceList.setDataSourceList(dataSourceList);
    joinDataSourceListBo = mapper.map(tFAgentStat);
    assertEquals(joinDataSourceListBo, JoinDataSourceListBo.EMPTY_JOIN_DATA_SOURCE_LIST_BO);
}
Also used : TFDataSourceList(com.navercorp.pinpoint.thrift.dto.flink.TFDataSourceList) ArrayList(java.util.ArrayList) TFAgentStat(com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat) TFDataSource(com.navercorp.pinpoint.thrift.dto.flink.TFDataSource) JoinDataSourceListBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinDataSourceListBo) Test(org.junit.Test)

Example 10 with JoinDataSourceListBo

use of com.navercorp.pinpoint.common.server.bo.stat.join.JoinDataSourceListBo in project pinpoint by naver.

the class JoinDataSourceListBoMapper method build.

@Override
public void build(TFAgentStat tFAgentStat, JoinAgentStatBo.Builder builder) {
    JoinDataSourceListBo joinDataSourceListBo = this.map(tFAgentStat);
    if (joinDataSourceListBo == JoinDataSourceListBo.EMPTY_JOIN_DATA_SOURCE_LIST_BO) {
        return;
    }
    builder.addDataSourceListBo(joinDataSourceListBo);
}
Also used : JoinDataSourceListBo(com.navercorp.pinpoint.common.server.bo.stat.join.JoinDataSourceListBo)

Aggregations

JoinDataSourceListBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinDataSourceListBo)10 ArrayList (java.util.ArrayList)7 JoinDataSourceBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinDataSourceBo)3 JoinIntFieldBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinIntFieldBo)3 TFDataSource (com.navercorp.pinpoint.thrift.dto.flink.TFDataSource)3 TFDataSourceList (com.navercorp.pinpoint.thrift.dto.flink.TFDataSourceList)3 AggreJoinDataSourceListBo (com.navercorp.pinpoint.web.vo.stat.AggreJoinDataSourceListBo)3 Test (org.junit.Test)3 JoinStatBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinStatBo)2 TFAgentStat (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStat)2 AggreJoinDataSourceBo (com.navercorp.pinpoint.web.vo.stat.AggreJoinDataSourceBo)2 Date (java.util.Date)1