@Override
  protected void doAlteration(DataConnector connector) throws HiveException {
    try {
      String newUrl = desc.getURL();

      if (StringUtils.isBlank(newUrl) || newUrl.equals(connector.getUrl())) {
        throw new HiveException("New URL for data connector cannot be blank or the same as the current one");
      }

      URI newURI = new URI(newUrl);
      if (!newURI.isAbsolute() || StringUtils.isBlank(newURI.getScheme())) {
        throw new HiveException(ErrorMsg.INVALID_PATH, newUrl); // TODO make a new error message for URL
      }
      connector.setUrl(newUrl);
      return;
    } catch (URISyntaxException e) {
      throw new HiveException(e);
    }
  }
Operation process of altering a connector's URL.
ql/src/java/org/apache/hadoop/hive/ql/ddl/dataconnector/alter/url/AlterDataConnectorSetUrlOperation.java