mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-18 17:26:14 +10:00
[강운덕] [LUCYSUS-1744] null체크 로직 강화.
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-web/trunk@2816 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -125,7 +125,7 @@ public class BusinessTransactionController {
|
||||
try {
|
||||
// select spans
|
||||
final SpanResult spanResult = this.spanService.selectSpan(traceId, focusTimestamp);
|
||||
List<SpanAlign> spanAligns = spanResult.getSpanAlign();
|
||||
List<SpanAlign> spanAligns = spanResult.getSpanAlignList();
|
||||
|
||||
if (spanAligns.isEmpty()) {
|
||||
mv.addObject("errorCode", 9);
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ScatterChartServiceImpl implements ScatterChartService {
|
||||
|
||||
final List<List<SpanBo>> traceList = traceDao.selectAllSpans(transactionIdList);
|
||||
|
||||
List<Dot> list = new ArrayList<Dot>();
|
||||
final List<Dot> result = new ArrayList<Dot>();
|
||||
|
||||
for (List<SpanBo> trace : traceList) {
|
||||
if (!filter.include(trace)) {
|
||||
@@ -63,13 +63,14 @@ public class ScatterChartServiceImpl implements ScatterChartService {
|
||||
|
||||
for (SpanBo span : trace) {
|
||||
if (applicationName.equals(span.getApplicationId())) {
|
||||
TransactionId transactionId = new TransactionId(span.getTraceAgentId(), span.getTraceAgentStartTime(), span.getTraceTransactionSequence());
|
||||
list.add(new Dot(transactionId, span.getCollectorAcceptTime(), span.getElapsed(), span.getErrCode(), span.getAgentId()));
|
||||
final TransactionId transactionId = new TransactionId(span.getTraceAgentId(), span.getTraceAgentStartTime(), span.getTraceTransactionSequence());
|
||||
final Dot dot = new Dot(transactionId, span.getCollectorAcceptTime(), span.getElapsed(), span.getErrCode(), span.getAgentId());
|
||||
result.add(dot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,14 +10,14 @@ import java.util.List;
|
||||
*/
|
||||
public class SpanResult {
|
||||
private int completeType;
|
||||
private List<SpanAlign> spanAlign;
|
||||
private List<SpanAlign> spanAlignList;
|
||||
|
||||
public SpanResult(int completeType, List<SpanAlign> spanAlign) {
|
||||
if (spanAlign == null) {
|
||||
throw new NullPointerException("spanAlign must not be null");
|
||||
public SpanResult(int completeType, List<SpanAlign> spanAlignList) {
|
||||
if (spanAlignList == null) {
|
||||
throw new NullPointerException("spanAlignList must not be null");
|
||||
}
|
||||
this.completeType = completeType;
|
||||
this.spanAlign = spanAlign;
|
||||
this.spanAlignList = spanAlignList;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ public class SpanResult {
|
||||
return completeType;
|
||||
}
|
||||
|
||||
public List<SpanAlign> getSpanAlign() {
|
||||
return spanAlign;
|
||||
public List<SpanAlign> getSpanAlignList() {
|
||||
return spanAlignList;
|
||||
}
|
||||
|
||||
public String getCompleteTypeString() {
|
||||
|
||||
@@ -57,7 +57,7 @@ public class SpanServiceImpl implements SpanService {
|
||||
}
|
||||
|
||||
SpanResult result = order(spans, selectedSpanHint);
|
||||
List<SpanAlign> order = result.getSpanAlign();
|
||||
List<SpanAlign> order = result.getSpanAlignList();
|
||||
// transitionApiId(order);
|
||||
transitionDynamicApiId(order);
|
||||
transitionSqlId(order);
|
||||
|
||||
@@ -38,9 +38,12 @@ public class TransactionInfoServiceImpl implements TransactionInfoService {
|
||||
private TraceDao traceDao;
|
||||
|
||||
@Override
|
||||
public BusinessTransactions selectBusinessTransactions(List<TransactionId> traceIds, String applicationName, long from, long to, Filter filter) {
|
||||
if (traceIds == null) {
|
||||
throw new NullPointerException("traceIds must not be null");
|
||||
public BusinessTransactions selectBusinessTransactions(List<TransactionId> transactionIdList, String applicationName, long from, long to, Filter filter) {
|
||||
if (transactionIdList == null) {
|
||||
throw new NullPointerException("transactionIdList must not be null");
|
||||
}
|
||||
if (applicationName == null) {
|
||||
throw new NullPointerException("applicationName must not be null");
|
||||
}
|
||||
if (filter == null) {
|
||||
throw new NullPointerException("filter must not be null");
|
||||
@@ -49,9 +52,9 @@ public class TransactionInfoServiceImpl implements TransactionInfoService {
|
||||
List<List<SpanBo>> traceList;
|
||||
|
||||
if (filter == Filter.NONE) {
|
||||
traceList = this.traceDao.selectSpans(traceIds);
|
||||
traceList = this.traceDao.selectSpans(transactionIdList);
|
||||
} else {
|
||||
traceList = this.traceDao.selectAllSpans(traceIds);
|
||||
traceList = this.traceDao.selectAllSpans(transactionIdList);
|
||||
}
|
||||
|
||||
BusinessTransactions businessTransactions = new BusinessTransactions();
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.util.Map.Entry;
|
||||
import com.nhn.pinpoint.common.bo.SpanBo;
|
||||
|
||||
/**
|
||||
* @author netspider
|
||||
* @author emeroad
|
||||
*/
|
||||
public class BusinessTransactions {
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</bean>
|
||||
|
||||
<import resource="classpath:applicationContext-hbase.xml" />
|
||||
<import resource="classpath:applicationContext-cache.xml" />
|
||||
<!--<import resource="classpath:applicationContext-cache.xml" />-->
|
||||
|
||||
<bean id="spanMapper" class="com.nhn.pinpoint.web.mapper.SpanMapper"></bean>
|
||||
<bean id="annotationMapper" class="com.nhn.pinpoint.web.mapper.AnnotationMapper"></bean>
|
||||
|
||||
@@ -109,7 +109,7 @@ public class SpanServiceTest {
|
||||
TransactionId traceId = new TransactionId(id.getAgentId(), id.getAgentStartTime(), id.getTransactionSequence());
|
||||
// selectedHint를 좀더 정확히 수정할것.
|
||||
SpanResult spanResult = spanService.selectSpan(traceId, System.currentTimeMillis());
|
||||
List<SpanAlign> sort = spanResult.getSpanAlign();
|
||||
List<SpanAlign> sort = spanResult.getSpanAlignList();
|
||||
for (SpanAlign spanAlign : sort) {
|
||||
logger.info("depth:{} {}", spanAlign.getDepth(), spanAlign.getSpanBo());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user