[bugfix](es-catalog)fix exception when querying ES table (#26788)

This commit is contained in:
Guangdong Liu
2023-11-14 10:47:37 +08:00
committed by GitHub
parent cd7ad99de0
commit e0934166f5
2 changed files with 16 additions and 1 deletions

View File

@ -110,7 +110,11 @@ public class EsNodeInfo {
String[] scratch = seed.split(":");
int port = 80;
if (scratch.length == 3) {
port = Integer.parseInt(scratch[2]);
String portStr = scratch[2];
if (portStr.contains("/")) {
portStr = portStr.substring(0, portStr.indexOf('/'));
}
port = Integer.parseInt(portStr);
}
String remoteHost = scratch[0] + ":" + scratch[1];
this.name = remoteHost;