public static TEndPoint parseTEndPointIpv4AndIpv6Url(String endPointUrl) {
    TEndPoint endPoint = new TEndPoint();
    if (endPointUrl.contains(PORT_SEPARATOR)) {
      int point_position = endPointUrl.lastIndexOf(PORT_SEPARATOR);
      String port = endPointUrl.substring(endPointUrl.lastIndexOf(PORT_SEPARATOR) + 1);
      String ip = endPointUrl.substring(0, point_position);
      // If the ip/host part is provided as IPv6 address, cut off the surrounding square brackets.
      if (ip.contains(ABB_COLON)) {
        ip = ip.substring(1, ip.length() - 1);
      }
      endPoint.setIp(ip);
      endPoint.setPort(Integer.parseInt(port));
    }
    return endPoint;
  }
Parse TEndPoint from a given TEndPointUrl
example:[D80:0000:0000:0000:ABAA:0000:00C2:0002]:22227

@param endPointUrl ip:port
@return TEndPoint null if parse error
iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/UrlUtils.java