#5 Pinpoint 클러스터 개발

This commit is contained in:
koo-taejin
2014-09-16 20:11:54 +09:00
parent bcd849d36a
commit c3f668bfdf
3 changed files with 12 additions and 2 deletions
@@ -128,6 +128,12 @@ public class ClusterPointRouter {
TBase command = deserialize(payload);
ChannelContext channelContext = profilerClusterPoint.getChannelContext(applicationName, agentId, -1);
if (channelContext == null) {
TResult result = new TResult(false);
result.setMessage(applicationName + "/" + agentId + " can't find suitable ChannelContext.");
channel.write(new ResponsePacket(requestPacket.getRequestId(), serialize(result)));
return;
}
Map<Object, Object> proeprties = channelContext.getChannelProperties();
String version = MapUtils.getString(proeprties, AgentPropertiesType.VERSION.getName());
@@ -75,7 +75,7 @@ public class ProfilerClusterPoint implements ClusterPoint {
if (startTimestamp <= 0) {
// Fix Me
// startTimestamp도 체크하게 변경해야함
return false;
return true;
}
return true;
@@ -50,7 +50,11 @@ public enum TCommandTypeVersion {
}
for (TCommandType eachCommand : supportCommandList) {
if (command.getClass().isInstance(eachCommand)) {
if (eachCommand == null) {
continue;
}
if (eachCommand.getClazz() == command.getClass()) {
return true;
}
}