use of com.navercorp.pinpoint.web.vo.Application in project pinpoint by naver.
the class DFSLinkSelector method getLinkKey.
private LinkKey getLinkKey(LinkData emulationLinkData) {
Application fromApplication = emulationLinkData.getFromApplication();
Application toApplication = emulationLinkData.getToApplication();
return new LinkKey(fromApplication, toApplication);
}
use of com.navercorp.pinpoint.web.vo.Application in project pinpoint by naver.
the class DFSLinkSelector method selectCaller.
/**
* Queries for all applications(callee) called by the callerApplication
*
* @param callerApplication
* @param range
* @return
*/
private LinkDataDuplexMap selectCaller(Application callerApplication, Range range, SearchDepth searchDepth) {
// skip if the callerApplication has already been checked
if (linkVisitChecker.visitCaller(callerApplication)) {
return new LinkDataDuplexMap();
}
LinkDataMap caller = mapStatisticsCallerDao.selectCaller(callerApplication, range);
if (logger.isDebugEnabled()) {
logger.debug("Found Caller. count={}, caller={}", caller.size(), callerApplication);
}
final LinkDataMap replaceRpcCaller = new LinkDataMap();
for (LinkData callerLink : caller.getLinkDataList()) {
final List<LinkData> checkedLink = checkRpcCallAccepted(callerLink, range);
for (LinkData linkData : checkedLink) {
replaceRpcCaller.addLinkData(linkData);
}
}
final LinkDataDuplexMap resultCaller = new LinkDataDuplexMap();
for (LinkData link : replaceRpcCaller.getLinkDataList()) {
resultCaller.addSourceLinkData(link);
final Application toApplication = link.getToApplication();
// skip if toApplication is a terminal or an unknown cloud
if (toApplication.getServiceType().isTerminal() || toApplication.getServiceType().isUnknown()) {
continue;
}
// search depth check
final SearchDepth nextLevel = searchDepth.nextDepth();
if (nextLevel.isDepthOverflow()) {
continue;
}
logger.debug(" Find subCaller of {}", toApplication);
LinkDataDuplexMap callerSub = selectCaller(toApplication, range, nextLevel);
logger.debug(" Found subCaller. count={}, caller={}", callerSub.size(), toApplication);
resultCaller.addLinkDataDuplexMap(callerSub);
// find all callers of queried subCallers as well
for (LinkData eachCaller : callerSub.getSourceLinkDataList()) {
logger.debug(" Find callee of {}", eachCaller.getFromApplication());
LinkDataDuplexMap calleeSub = selectCallee(eachCaller.getFromApplication(), range, nextLevel);
logger.debug(" Found subCallee. count={}, callee={}", calleeSub.size(), eachCaller.getFromApplication());
resultCaller.addLinkDataDuplexMap(calleeSub);
}
}
return resultCaller;
}
use of com.navercorp.pinpoint.web.vo.Application in project pinpoint by naver.
the class AgentInfoServiceImpl method getApplicationNameList.
private List<String> getApplicationNameList(List<Application> applications) {
List<String> applicationNameList = new ArrayList<>(applications.size());
for (Application application : applications) {
if (!applicationNameList.contains(application.getName())) {
applicationNameList.add(application.getName());
}
}
Collections.sort(applicationNameList, Ordering.usingToString());
return applicationNameList;
}
use of com.navercorp.pinpoint.web.vo.Application in project pinpoint by naver.
the class AgentInfoServiceImpl method getApplicationAgentList.
@Override
public ApplicationAgentList getApplicationAgentList(ApplicationAgentList.Key key, long timestamp) {
ApplicationAgentList applicationAgentList = new ApplicationAgentList();
List<Application> applications = applicationIndexDao.selectAllApplicationNames();
for (Application application : applications) {
applicationAgentList.merge(this.getApplicationAgentList(key, application.getName(), timestamp));
}
return applicationAgentList;
}
use of com.navercorp.pinpoint.web.vo.Application in project pinpoint by naver.
the class ApplicationGroupSerializer method serialize.
@Override
public void serialize(ApplicationGroup applicationGroup, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException {
jgen.writeStartArray();
List<Application> applicationList = applicationGroup.getApplicationList();
for (Application application : applicationList) {
jgen.writeObject(application);
}
jgen.writeEndArray();
}
Aggregations