private Path backupOutputPath(FileSystem fs, Path outpath)
      throws IOException, HiveException {
    if (fs.exists(outpath)) {
      Path backupPath = new Path(outpath.getParent(),
          BACKUP_PREFIX + outpath.getName());
      Utilities.rename(fs, outpath, backupPath);
      return backupPath;
    } else {
      return null;
    }
  }
Validates that each input path belongs to the same partition since each
mapper merges the input to a single output directory

@param inputPath - input path
ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractFileMergeOperator.java