use of com.navercorp.pinpoint.web.cluster.connection.ClusterAcceptor in project pinpoint by naver.
the class ClusterManager method start.
@PostConstruct
public void start() throws InterruptedException, IOException, KeeperException {
logger.info("start() started.");
if (!config.isClusterEnable()) {
logger.info("start() skipped. caused:cluster option disabled.");
return;
}
try {
clusterConnectionManager.start();
clusterDataManager.start();
ClusterAcceptor clusterAcceptor = clusterConnectionManager.getClusterAcceptor();
if (clusterAcceptor != null) {
String nodeName = clusterAcceptor.getBindHost() + ":" + clusterAcceptor.getBindPort();
List<String> localIpList = NetUtils.getLocalV4IpList();
clusterDataManager.registerWebCluster(nodeName, convertIpListToBytes(localIpList, "\r\n"));
}
} catch (Exception e) {
logger.warn("start() failed. caused:{}.", e.getMessage(), e);
clearResource();
}
logger.info("start() completed.");
}
Aggregations