public void recycleDirToCmPath(Path dataPath, boolean isPurge) throws HiveException {
    try {
      CmRecycleRequest request = new CmRecycleRequest(dataPath.toString(), isPurge);
      getSynchronizedMSC().recycleDirToCmPath(request);
    } catch (Exception e) {
      throw new HiveException(e);
    }
  }
Recycles the files recursively from the input path to the cmroot directory either by copying or moving it.

@param dataPath Path of the data files to be recycled to cmroot
@param isPurge
         When set to true files which needs to be recycled are not moved to Trash
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java