public List<Partition> exchangeTablePartitions(Map<String, String> partitionSpecs,
      String sourceDb, String sourceTable, String destDb,
      String destinationTableName) throws HiveException {
    try {
      List<org.apache.hadoop.hive.metastore.api.Partition> partitions =
        getMSC().exchange_partitions(partitionSpecs, sourceDb, sourceTable, destDb,
        destinationTableName);

      return convertFromMetastore(getTable(destDb, destinationTableName), partitions);
    } catch (Exception ex) {
      LOG.error("Failed exchangeTablePartitions", ex);
      throw new HiveException(ex);
    }
  }
Trashes or deletes all files under a directory. Leaves the directory as is.
@param fs FileSystem to use
@param statuses fileStatuses of files to be deleted
@param conf hive configuration
@return true if deletion successful
@throws IOException
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java