use of com.navercorp.pinpoint.web.scatter.ScatterData in project pinpoint by naver.
the class HbaseApplicationTraceIndexDao method scanTraceScatterData.
@Override
public ScatterData scanTraceScatterData(String applicationName, Range range, int xGroupUnit, int yGroupUnit, int limit, boolean scanBackward) {
if (applicationName == null) {
throw new NullPointerException("applicationName must not be null");
}
if (range == null) {
throw new NullPointerException("range must not be null");
}
if (limit < 0) {
throw new IllegalArgumentException("negative limit:" + limit);
}
logger.debug("scanTraceScatterDataMadeOfDotGroup");
Scan scan = createScan(applicationName, range, scanBackward);
TraceIndexScatterMapper3 mapper = new TraceIndexScatterMapper3(range.getFrom(), range.getTo(), xGroupUnit, yGroupUnit);
List<ScatterData> dotGroupList = hbaseOperations2.findParallel(HBaseTables.APPLICATION_TRACE_INDEX, scan, traceIdRowKeyDistributor, limit, mapper, APPLICATION_TRACE_INDEX_NUM_PARTITIONS);
if (CollectionUtils.isEmpty(dotGroupList)) {
return new ScatterData(range.getFrom(), range.getTo(), xGroupUnit, yGroupUnit);
} else {
ScatterData firstScatterData = dotGroupList.get(0);
for (int i = 1; i < dotGroupList.size(); i++) {
firstScatterData.merge(dotGroupList.get(i));
}
return firstScatterData;
}
}
use of com.navercorp.pinpoint.web.scatter.ScatterData in project pinpoint by naver.
the class TraceIndexScatterMapper3 method mapRow.
@Override
public ScatterData mapRow(Result result, int rowNum) throws Exception {
if (result.isEmpty()) {
return new ScatterData(from, to, xGroupUnit, yGroupUnit);
}
ScatterData scatterData = new ScatterData(from, to, xGroupUnit, yGroupUnit);
Cell[] rawCells = result.rawCells();
for (Cell cell : rawCells) {
final Dot dot = createDot(cell);
if (dot != null) {
scatterData.addDot(dot);
}
}
return scatterData;
}
Aggregations