static IoTDBConnectionParams parseUrl(String url, Properties info) throws IoTDBURLException {
    IoTDBConnectionParams params = new IoTDBConnectionParams(url);
    if (url.trim().equalsIgnoreCase(Config.IOTDB_URL_PREFIX)) {
      return params;
    }

    boolean isUrlLegal = false;
    Matcher matcher = null;
    String host = null;
    String suffixURL = null;
    if (url.startsWith(Config.IOTDB_URL_PREFIX)) {
      String subURL = url.substring(Config.IOTDB_URL_PREFIX.length());
      int i = subURL.lastIndexOf(COLON);
      host = subURL.substring(0, i);
      params.setHost(host);
      i++;
      // parse port
      int port = 0;
      for (; i < subURL.length() && Character.isDigit(subURL.charAt(i)); i++) {
        port = port * 10 + (subURL.charAt(i) - '0');
      }
      suffixURL = i < subURL.length() ? subURL.substring(i) : "";
      // legal port
      if (port >= 1 && port <= 65535) {
        params.setPort(port);

        // parse database
        if (i < subURL.length() && subURL.charAt(i) == SLASH) {
          int endIndex = subURL.indexOf(PARAMETER_SEPARATOR, i + 1);
          String database;
          if (endIndex <= i + 1) {
            if (i + 1 == subURL.length()) {
              database = null;
            } else {
              database = subURL.substring(i + 1);
            }
            suffixURL = "";
          } else {
            database = subURL.substring(i + 1, endIndex);
            suffixURL = subURL.substring(endIndex);
          }
          params.setDb(database);
        }

        matcher = SUFFIX_URL_PATTERN.matcher(suffixURL);
        if (matcher.matches() && parseUrlParam(subURL, info)) {
          isUrlLegal = true;
        }
      }
    }
    if (!isUrlLegal) {
      throw new IoTDBURLException(
          "Error url format, url should be jdbc:iotdb://anything:port/[database] or jdbc:iotdb://anything:port[/database]?property1=value1&property2=value2, current url is "
              + url);
    }

    if (info.containsKey(Config.AUTH_USER)) {
      params.setUsername(info.getProperty(Config.AUTH_USER));
    }
    if (info.containsKey(Config.AUTH_PASSWORD)) {
      params.setPassword(info.getProperty(Config.AUTH_PASSWORD));
    }
    if (info.containsKey(Config.DEFAULT_BUFFER_CAPACITY)) {
      params.setThriftDefaultBufferSize(
          Integer.parseInt(info.getProperty(Config.DEFAULT_BUFFER_CAPACITY)));
    }
    if (info.containsKey(Config.THRIFT_FRAME_MAX_SIZE)) {
      params.setThriftMaxFrameSize(
          Integer.parseInt(info.getProperty(Config.THRIFT_FRAME_MAX_SIZE)));
    }
    if (info.containsKey(Config.VERSION)) {
      params.setVersion(Constant.Version.valueOf(info.getProperty(Config.VERSION)));
    }
    if (info.containsKey(Config.NETWORK_TIMEOUT)) {
      params.setNetworkTimeout(Integer.parseInt(info.getProperty(Config.NETWORK_TIMEOUT)));
    }
    if (info.containsKey(Config.TIME_ZONE)) {
      params.setTimeZone(info.getProperty(Config.TIME_ZONE));
    }
    if (info.containsKey(Config.CHARSET)) {
      params.setCharset(info.getProperty(Config.CHARSET));
    }
    if (info.containsKey(Config.USE_SSL)) {
      params.setUseSSL(Boolean.parseBoolean(info.getProperty(Config.USE_SSL)));
    }
    if (info.containsKey(Config.TRUST_STORE)) {
      params.setTrustStore(info.getProperty(Config.TRUST_STORE));
    }
    if (info.containsKey(Config.TRUST_STORE_PWD)) {
      params.setTrustStorePwd(info.getProperty(Config.TRUST_STORE_PWD));
    }
    if (info.containsKey(Config.SQL_DIALECT)) {
      params.setSqlDialect(info.getProperty(Config.SQL_DIALECT));
    }

    return params;
  }
Parse JDBC connection URL The only supported format of the URL is:
jdbc:iotdb://localhost:6667/.
iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/Utils.java