diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotInfo.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotInfo.java index 686d960..5866163 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotInfo.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotInfo.java @@ -296,6 +296,8 @@ public final class SnapshotInfo extends Configured implements Tool { } printInfo(); + // Print corrupt snapshot files if any + printFiles(false); if (showSchema) printSchema(); if (showFiles || showStats) printFiles(showFiles); @@ -403,15 +405,17 @@ public final class SnapshotInfo extends Configured implements Tool { System.out.println("**************************************************************"); } - System.out.printf("%d HFiles (%d in archive), total size %s (%.2f%% %s shared with the source table)%n", - stats.getStoreFilesCount(), stats.getArchivedStoreFilesCount(), - StringUtils.humanReadableInt(stats.getStoreFilesSize()), - stats.getSharedStoreFilePercentage(), - StringUtils.humanReadableInt(stats.getSharedStoreFilesSize()) - ); - System.out.printf("%d Logs, total size %s%n", - stats.getLogsCount(), StringUtils.humanReadableInt(stats.getLogsSize())); - System.out.println(); + if (showFiles){ + System.out.printf("%d HFiles (%d in archive), total size %s (%.2f%% %s shared with the source table)%n", + stats.getStoreFilesCount(), stats.getArchivedStoreFilesCount(), + StringUtils.humanReadableInt(stats.getStoreFilesSize()), + stats.getSharedStoreFilePercentage(), + StringUtils.humanReadableInt(stats.getSharedStoreFilesSize()) + ); + System.out.printf("%d Logs, total size %s%n", + stats.getLogsCount(), StringUtils.humanReadableInt(stats.getLogsSize())); + System.out.println(); + } } private void printUsageAndExit() {