|
@@ -8,7 +8,6 @@ import com.evps.common.dto.NET;
|
|
|
import com.evps.common.dto.NetState;
|
|
|
import com.evps.common.kafka.dto.KafkaEvpsServiceDto;
|
|
|
import com.its.common.network.NettyUtils;
|
|
|
-import com.its.common.utils.Elapsed;
|
|
|
import io.netty.channel.Channel;
|
|
|
import io.netty.util.AttributeKey;
|
|
|
import lombok.Getter;
|
|
@@ -138,12 +137,12 @@ public class ApplicationRepository {
|
|
|
// }
|
|
|
|
|
|
private void loadCenterInfo() {
|
|
|
- Elapsed elapsed = new Elapsed();
|
|
|
+// Elapsed elapsed = new Elapsed();
|
|
|
initCenterMap();
|
|
|
|
|
|
try {
|
|
|
List<TbEvpsCenter> lists = this.mapper.selectAll();
|
|
|
- log.info("ApplicationRepository.loadCenterInfo: {} EA", lists.size());
|
|
|
+// log.info("ApplicationRepository.loadCenterInfo: {} EA", lists.size());
|
|
|
for (TbEvpsCenter entity : lists) {
|
|
|
EvpsCenter dto = entity.toDto();
|
|
|
EvpsCenter center = this.centerMap.get(dto.getCenterId());
|
|
@@ -160,13 +159,13 @@ public class ApplicationRepository {
|
|
|
this.centerMap.put(dto.getCenterId(), center);
|
|
|
this.ipAddrMap.put(dto.getIpAddress(), center);
|
|
|
}
|
|
|
- log.info("ApplicationRepository.loadCenterInfo: NetStat: {}, {}.", center.getNetState().getState(), entity);
|
|
|
+// log.info("ApplicationRepository.loadCenterInfo: NetStat: {}, {}.", center.getNetState().getState(), entity);
|
|
|
}
|
|
|
}
|
|
|
catch (Exception e) {
|
|
|
log.error("ApplicationRepository.loadCenterInfo: {}.", e.toString());
|
|
|
}
|
|
|
- log.info("ApplicationRepository.loadCenterInfo: {} ms.", elapsed.milliSeconds());
|
|
|
+// log.info("ApplicationRepository.loadCenterInfo: {} ms.", elapsed.milliSeconds());
|
|
|
}
|
|
|
|
|
|
// public void updateEvpsCenterLastComm(String centerId) {
|
|
@@ -197,7 +196,7 @@ public class ApplicationRepository {
|
|
|
public void reportCenterSessions() {
|
|
|
//[Remote #(10.4.4.51:47734)]
|
|
|
log.info("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
|
|
|
- log.info("Center IpAddress NetState Connected Connect_Time Disconnect_Time Remote_Address Name ");
|
|
|
+ log.info("Center IpAddress NetState Connected Connect_Time Disconnect_Time Remote_Address Dump Name ");
|
|
|
log.info("-----------------------------------------------------------------------------------------------------------------------------------------");
|
|
|
List<String> keySet = new ArrayList<>(this.centerMap.keySet());
|
|
|
Collections.sort(keySet);
|
|
@@ -205,7 +204,7 @@ public class ApplicationRepository {
|
|
|
for (String key : keySet) {
|
|
|
EvpsCenter center = this.centerMap.get(key);
|
|
|
String channelIpAddress = center.getNetState().isActive() ? NettyUtils.getRemoteAddress(center.getNetState().getChannel()) : "---";
|
|
|
- log.info("{}", String.format("%-6s %-15s %-8s %9d %s %s %-33s %s",
|
|
|
+ log.info("{}", String.format("%-6s %-15s %-8s %9d %s %s %-33s %-5s %s",
|
|
|
center.getCenterId(),
|
|
|
center.getIpAddress(),
|
|
|
center.getNetState().isActive(),
|
|
@@ -213,6 +212,7 @@ public class ApplicationRepository {
|
|
|
center.getNetState().getConnectTimeString(),
|
|
|
center.getNetState().getDisconnectTimeString(),
|
|
|
channelIpAddress,
|
|
|
+ center.isDump(),
|
|
|
center.getCenterNm()));
|
|
|
}
|
|
|
log.info("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
|