private void logResult(CheckResult result) {
    StringBuilder sb = new StringBuilder();
    sb.append(TABLES_NOT_IN_METASTORE).append(" ").append(result.getTablesNotInMs()).append("\n")
        .append(TABLES_MISSING_ON_FILESYSTEM).append(" ").append(result.getTablesNotOnFs()).append("\n")
        .append(PARTITIONS_NOT_IN_METASTORE).append(" ").append(result.getPartitionsNotInMs()).append("\n")
        .append(PARTITIONS_MISSING_FROM_FILESYSTEM).append(" ").append(result.getPartitionsNotOnFs()).append("\n")
        .append(EXPIRED_PARTITIONS).append(" ").append(result.getExpiredPartitions()).append("\n");
    LOG.info(sb.toString());
  }
MetastoreCheck, see if the data in the metastore matches what is on the
dfs. Current version checks for tables and partitions that are either
missing on disk on in the metastore.

@param msckInfo Information about the tables and partitions we want to check for.
@return Returns 0 when execution succeeds and above 0 if it fails.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/Msck.java