Skip to content

Commit 6616cf2

Browse files
committed
1 parent 0046d0f commit 6616cf2

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

web/src/main/java/com/navercorp/pinpoint/web/applicationmap/dao/hbase/HbaseMapInLinkDao.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ public LinkDataMap selectInLink(Application inApplication, TimeWindow timeWindow
8888

8989
final Scan scan = scanFactory.createScan("MapInLinkScan", inApplication, timeWindow.getWindowRange(), DESCRIPTOR.getName());
9090

91-
return selectInLink(scan, DESCRIPTOR.getTable(), resultExtractor, MAP_STATISTICS_CALLER_VER2_NUM_PARTITIONS);
91+
final LinkDataMap linkDataMap = selectInLink(scan, DESCRIPTOR.getTable(), resultExtractor, MAP_STATISTICS_CALLER_VER2_NUM_PARTITIONS);
92+
if (logger.isDebugEnabled()) {
93+
logger.debug("selectInLink {} {}", inApplication, linkDataMap.getLinkDataSize());
94+
}
95+
return linkDataMap;
9296
}
9397

9498
private TimeWindowFunction newTimeWindow(boolean timeAggregated) {

web/src/main/java/com/navercorp/pinpoint/web/applicationmap/dao/hbase/HbaseMapOutLinkDao.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ public LinkDataMap selectOutLink(Application outApplication, TimeWindow timeWind
8686
ResultsExtractor<LinkDataMap> resultExtractor = new RowMapReduceResultExtractor<>(rowMapper, new LinkTimeWindowReducer(timeWindow));
8787

8888
final Scan scan = scanFactory.createScan("MapOutLinkScan", outApplication, timeWindow.getWindowRange(), DESCRIPTOR.getName());
89-
return selectOutLink(scan, DESCRIPTOR.getTable(), resultExtractor, MAP_STATISTICS_CALLEE_VER2_NUM_PARTITIONS);
89+
final LinkDataMap linkDataMap = selectOutLink(scan, DESCRIPTOR.getTable(), resultExtractor, MAP_STATISTICS_CALLEE_VER2_NUM_PARTITIONS);
90+
if (logger.isDebugEnabled()) {
91+
logger.debug("selectOutLink {} {}", outApplication, linkDataMap.getLinkDataSize());
92+
}
93+
return linkDataMap;
9094
}
9195

9296
private TimeWindowFunction newTimeWindow(boolean timeAggregated) {

web/src/main/java/com/navercorp/pinpoint/web/applicationmap/dao/mapper/OutLinkMapper.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
*/
4343
public class OutLinkMapper implements RowMapper<LinkDataMap> {
4444

45+
private static final String MERGE_AGENT = "_ALL_";
46+
4547
private final Logger logger = LogManager.getLogger(this.getClass());
4648

4749
private final LinkFilter filter;
@@ -69,7 +71,9 @@ public LinkDataMap mapRow(Result result, int rowNum) throws Exception {
6971
if (result.isEmpty()) {
7072
return new LinkDataMap();
7173
}
72-
logger.debug("mapRow:{}", rowNum);
74+
if (logger.isDebugEnabled()) {
75+
logger.debug("mapRow num:{} size:{}", rowNum, result.size());
76+
}
7377

7478
final byte[] rowKey = getOriginalKey(result.getRow());
7579

@@ -89,7 +93,8 @@ public LinkDataMap mapRow(Result result, int rowNum) throws Exception {
8993
String inHost = buffer.readPrefixedString();
9094
short histogramSlot = buffer.readShort();
9195

92-
String outAgentId = buffer.readPrefixedString();
96+
String outAgentId = readOutAgentId(buffer);
97+
9398

9499
long requestCount = CellUtils.valueToLong(cell);
95100
if (logger.isDebugEnabled()) {
@@ -106,6 +111,15 @@ public LinkDataMap mapRow(Result result, int rowNum) throws Exception {
106111
return linkDataMap;
107112
}
108113

114+
private String readOutAgentId(Buffer buffer) {
115+
String outAgentId = buffer.readPrefixedString();
116+
if (MERGE_AGENT.equals(outAgentId)) {
117+
// for gc
118+
return MERGE_AGENT;
119+
}
120+
return outAgentId;
121+
}
122+
109123

110124
private Application readInApplication(Buffer buffer) {
111125
short inServiceType = buffer.readShort();

0 commit comments

Comments
 (0)