@Override
  protected void doAlteration(Catalog catalog) throws HiveException {
    try {
      String newLocation = Utilities.getQualifiedPath(context.getConf(), new Path(desc.getLocation()));

      URI locationURI = new URI(newLocation);
      if (!locationURI.isAbsolute()) {
        throw new HiveException(ErrorMsg.BAD_LOCATION_VALUE, newLocation);
      }

      if (newLocation.equals(catalog.getLocationUri())) {
        LOG.info("AlterCatalog skipped. No change in location.");
      } else {
        catalog.setLocationUri(newLocation);
        LOG.info("Catalog location changed from {} to {}", catalog.getLocationUri(), newLocation);
      }
    } catch (URISyntaxException e) {
      throw new HiveException(e);
    }
  }
Operation process of altering a catalog's location.
ql/src/java/org/apache/hadoop/hive/ql/ddl/catalog/alter/location/AlterCatalogSetLocationOperation.java