@Override
  protected void doAlteration(Table table, Partition partition) throws HiveException {
    // process location one-by-one
    for (Map.Entry<List<String>, String> entry : desc.getSkewedLocations().entrySet()) {
      List<String> key = entry.getKey();
      String newLocation = entry.getValue();
      try {
        URI locationUri = new URI(newLocation);
        List<String> skewedLocation = new ArrayList<String>(key);
        if (partition != null) {
          partition.setSkewedValueLocationMap(skewedLocation, locationUri.toString());
        } else {
          table.setSkewedValueLocationMap(skewedLocation, locationUri.toString());
        }
      } catch (URISyntaxException e) {
        throw new HiveException(e);
      }
    }

    environmentContext.getProperties().remove(StatsSetupConst.DO_NOT_UPDATE_STATS);
  }
Operation process of setting the skewed location.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/skewed/AlterTableSetSkewedLocationOperation.java