Search in sources :

Example 1 with TraceIndexScatterMapper2

use of com.navercorp.pinpoint.web.mapper.TraceIndexScatterMapper2 in project pinpoint by naver.

the class HbaseApplicationTraceIndexDao method scanTraceScatter.

/**
     *
     */
@Override
public List<Dot> scanTraceScatter(String applicationName, SelectedScatterArea area, TransactionId offsetTransactionId, int offsetTransactionElapsed, int limit) {
    if (applicationName == null) {
        throw new NullPointerException("applicationName must not be null");
    }
    if (area == null) {
        throw new NullPointerException("range must not be null");
    }
    if (limit < 0) {
        throw new IllegalArgumentException("negative limit:" + limit);
    }
    logger.debug("scanTraceScatter");
    Scan scan = createScan(applicationName, area.getTimeRange());
    // method 1
    // not used yet. instead, use another row mapper (testing)
    // scan.setFilter(makeResponseTimeFilter(area, offsetTransactionId, offsetTransactionElapsed));
    // method 2
    ResponseTimeRange responseTimeRange = area.getResponseTimeRange();
    TraceIndexScatterMapper2 mapper = new TraceIndexScatterMapper2(responseTimeRange.getFrom(), responseTimeRange.getTo());
    List<List<Dot>> dotListList = hbaseOperations2.findParallel(HBaseTables.APPLICATION_TRACE_INDEX, scan, traceIdRowKeyDistributor, limit, mapper, APPLICATION_TRACE_INDEX_NUM_PARTITIONS);
    List<Dot> result = new ArrayList<>();
    for (List<Dot> dotList : dotListList) {
        result.addAll(dotList);
    }
    return result;
}
Also used : TraceIndexScatterMapper2(com.navercorp.pinpoint.web.mapper.TraceIndexScatterMapper2) ResponseTimeRange(com.navercorp.pinpoint.web.vo.ResponseTimeRange) ArrayList(java.util.ArrayList) Dot(com.navercorp.pinpoint.web.vo.scatter.Dot) Scan(org.apache.hadoop.hbase.client.Scan) FilterList(org.apache.hadoop.hbase.filter.FilterList) ArrayList(java.util.ArrayList) List(java.util.List)

Aggregations

TraceIndexScatterMapper2 (com.navercorp.pinpoint.web.mapper.TraceIndexScatterMapper2)1 ResponseTimeRange (com.navercorp.pinpoint.web.vo.ResponseTimeRange)1 Dot (com.navercorp.pinpoint.web.vo.scatter.Dot)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Scan (org.apache.hadoop.hbase.client.Scan)1 FilterList (org.apache.hadoop.hbase.filter.FilterList)1