private String getFileCheckSum(FileSystem fileSystem, Path p) throws Exception {
    FileChecksum cksum = fileSystem.getFileChecksum(p);
    if (cksum != null) {
      String checksumString =
          StringUtils.byteToHexString(cksum.getBytes(), 0, cksum.getLength());
      return checksumString;
    }
    return "";
  }
Test that tables set up with auto-purge skip trash-directory when tables/partitions are dropped.
@throws Throwable
ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHive.java