mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-18 09:16:00 +10:00
@@ -0,0 +1,14 @@
|
||||
package com.nhn.pinpoint.collector.cluster;
|
||||
|
||||
import com.nhn.pinpoint.rpc.server.ChannelContext;
|
||||
|
||||
/**
|
||||
* @author koo.taejin
|
||||
*/
|
||||
public interface PinpointClusterManager {
|
||||
|
||||
void register(ChannelContext channelContext);
|
||||
|
||||
void unregister(ChannelContext channelContext);
|
||||
|
||||
}
|
||||
-1
@@ -2,7 +2,6 @@ package com.nhn.pinpoint.collector.cluster.zookeeper;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
+3
-5
@@ -1,6 +1,5 @@
|
||||
package com.nhn.pinpoint.collector.cluster.zookeeper;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.management.ManagementFactory;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -11,7 +10,6 @@ import java.util.concurrent.ThreadFactory;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.zookeeper.KeeperException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -138,12 +136,12 @@ public class ZookeeperLatestJobWorker implements Runnable {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
logger.info("LeackDetector Start.");
|
||||
logger.debug("LeackDetector Start.");
|
||||
|
||||
List<ChannelContext> currentChannelContextList = getRegisteredChannelContextList();
|
||||
for (ChannelContext channelContext : currentChannelContextList) {
|
||||
if (PinpointServerSocketStateCode.isFinished(channelContext.getCurrentStateCode())) {
|
||||
logger.debug("LeackDetector Find Leak ChannelContext={}.", channelContext);
|
||||
logger.info("LeackDetector Find Leak ChannelContext={}.", channelContext);
|
||||
putJob(channelContext, new DeleteJob());
|
||||
}
|
||||
}
|
||||
@@ -229,7 +227,7 @@ public class ZookeeperLatestJobWorker implements Runnable {
|
||||
waitTime = 1000;
|
||||
}
|
||||
if (waitUnitTimeMillis < 100) {
|
||||
waitUnitTime = 500;
|
||||
waitUnitTime = 100;
|
||||
}
|
||||
|
||||
long startTimeMillis = System.currentTimeMillis();
|
||||
|
||||
Reference in New Issue
Block a user