mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-22 19:27:13 +10:00
[강운덕] [LUCYSUS-1744] HbaseApplicationStatisticsDao에서 agentId가 null인 케이스가 정상이라 null일경우를 대비하도록 수정함.
- interceptor에서 destinationId와 endpoint가 동일한 경우 endpoint를 저장하는지 않는게 맞아 다시 롤빽함. git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-server/trunk@2177 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
+2
-1
@@ -70,8 +70,9 @@ public class HbaseApplicationMapStatisticsCalleeDao implements ApplicationMapSta
|
||||
// make row key. rowkey는 나.
|
||||
long acceptedTime = acceptedTimeService.getAcceptedTime();
|
||||
long rowTimeSlot = TimeSlot.getStatisticsRowSlot(acceptedTime);
|
||||
short callerSlotNumber = ApplicationMapStatisticsUtils.getSlotNumber(callerServiceType, elapsed, isError);
|
||||
RowKey calleeRowKey = new CallRowKey(calleeApplicationName, calleeServiceType, rowTimeSlot);
|
||||
|
||||
short callerSlotNumber = ApplicationMapStatisticsUtils.getSlotNumber(callerServiceType, elapsed, isError);
|
||||
ColumnName callerColumnName = new CallColumnName(callerServiceType, callerApplicationName, calleeHost, callerSlotNumber);
|
||||
if (useBulk) {
|
||||
RowInfo rowInfo = new DefaultRowInfo(calleeRowKey, callerColumnName);
|
||||
|
||||
+3
-1
@@ -75,9 +75,11 @@ public class HbaseApplicationMapStatisticsCallerDao implements ApplicationMapSta
|
||||
// make row key. rowkey는 나.
|
||||
long acceptedTime = acceptedTimeService.getAcceptedTime();
|
||||
long rowTimeSlot = TimeSlot.getStatisticsRowSlot(acceptedTime);
|
||||
short calleeSlotNumber = ApplicationMapStatisticsUtils.getSlotNumber(calleeServiceType, elapsed, isError);
|
||||
RowKey callerRowKey = new CallRowKey(callerApplicationName, callerServiceType, rowTimeSlot);
|
||||
|
||||
short calleeSlotNumber = ApplicationMapStatisticsUtils.getSlotNumber(calleeServiceType, elapsed, isError);
|
||||
ColumnName calleeColumnName = new CallColumnName(calleeServiceType, calleeApplicationName, callerHost, calleeSlotNumber);
|
||||
|
||||
if (useBulk) {
|
||||
RowInfo rowInfo = new DefaultRowInfo(callerRowKey, calleeColumnName);
|
||||
counter.increment(rowInfo, 1L);
|
||||
|
||||
@@ -68,6 +68,11 @@ public class HbaseApplicationStatisticsDao implements ApplicationStatisticsDao {
|
||||
logger.debug("[UpdatingApplicationMapStatistics] " + applicationName + ", " + ServiceType.findServiceType(serviceType) + ", " + agentId + ", " + elapsed + ", " + isError);
|
||||
}
|
||||
|
||||
// agentId는 null이 될수 있음.
|
||||
if (agentId == null) {
|
||||
agentId = "";
|
||||
}
|
||||
|
||||
// make row key. rowkey는 나.
|
||||
long acceptedTime = acceptedTimeService.getAcceptedTime();
|
||||
long rowTimeSlot = TimeSlot.getStatisticsRowSlot(acceptedTime);
|
||||
|
||||
@@ -109,7 +109,7 @@ public class SpanHandler implements SimpleHandler {
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.warn("Span handle error. Caused:{}", e.getMessage(), e);
|
||||
logger.warn("Span handle error. Caused:{}. Span:{}", new Object[] {e.getMessage(), tbase, e});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,8 +206,9 @@ public class UDPReceiver implements DataReceiver {
|
||||
Timer.Context time = timer.time();
|
||||
|
||||
HeaderTBaseDeserializer deserializer = this.deserializer.get();
|
||||
TBase<?, ?> tBase = null;
|
||||
try {
|
||||
TBase<?, ?> tBase = deserializer.deserialize(packet.getData());
|
||||
tBase = deserializer.deserialize(packet.getData());
|
||||
// dispatch는 비지니스 로직 실행을 의미.
|
||||
dispatchHandler.dispatch(tBase, packet.getData(), Header.HEADER_SIZE, packet.getLength());
|
||||
} catch (TException e) {
|
||||
@@ -220,7 +221,7 @@ public class UDPReceiver implements DataReceiver {
|
||||
} catch (Exception e) {
|
||||
// 잘못된 header가 도착할 경우 발생하는 케이스가 있음.
|
||||
if (logger.isWarnEnabled()) {
|
||||
logger.warn("Unexpected error. SendSocketAddress:{} Cause:{}", new Object[]{packet.getSocketAddress(), e.getMessage(), e});
|
||||
logger.warn("Unexpected error. SendSocketAddress:{} Cause:{} tbase:{}", new Object[]{packet.getSocketAddress(), e.getMessage(), e, tBase});
|
||||
}
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("packet dump hex:{}", PacketUtils.dumpDatagramPacket(packet));
|
||||
|
||||
@@ -17,7 +17,7 @@ public class ApplicationContextUtils {
|
||||
}
|
||||
|
||||
public static DispatchHandler getDispatchHandler(AbstractApplicationContext context) {
|
||||
return context.getBean("DispatchHandler", DispatchHandler.class);
|
||||
return context.getBean("dispatchHandler", DispatchHandler.class);
|
||||
}
|
||||
|
||||
private static GenericApplicationContext createContext0(String contextClassPath) {
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
<import resource="classpath:applicationContext-hbase.xml"></import>
|
||||
|
||||
<bean id="DispatchHandler" class="com.nhn.pinpoint.collector.receiver.DispatchHandler"></bean>
|
||||
<bean id="dispatchHandler" class="com.nhn.pinpoint.collector.receiver.DispatchHandler"></bean>
|
||||
|
||||
|
||||
<bean id="daoAutoFlusher" class="com.nhn.pinpoint.collector.dao.AutoFlusher" init-method="initialize" destroy-method="shutdown">
|
||||
|
||||
Reference in New Issue
Block a user