diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java index d7cc0ee..680accd 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java @@ -684,6 +684,7 @@ public final class ExportSnapshot extends Configured implements Tool { */ @Override public int run(String[] args) throws IOException { + boolean verifyDestination = true; boolean verifyChecksum = true; String snapshotName = null; boolean overwrite = false; @@ -711,6 +712,8 @@ public final class ExportSnapshot extends Configured implements Tool { FSUtils.setRootDir(conf, sourceDir); } else if (cmd.equals("-no-checksum-verify")) { verifyChecksum = false; + } else if (cmd.equals("-skip-dst-verify")) { + verifyDestination = false; } else if (cmd.equals("-mappers")) { mappers = Integer.parseInt(args[++i]); } else if (cmd.equals("-chuser")) { @@ -822,8 +825,10 @@ public final class ExportSnapshot extends Configured implements Tool { } // Step 4 - Verify snapshot validity - LOG.info("Verify snapshot validity"); - verifySnapshot(conf, outputFs, outputRoot, outputSnapshotDir); + if (verifyDestination) { + LOG.info("Verify snapshot validity"); + verifySnapshot(conf, outputFs, outputRoot, outputSnapshotDir); + } LOG.info("Export Completed: " + snapshotName); return 0; @@ -843,7 +848,8 @@ public final class ExportSnapshot extends Configured implements Tool { System.err.println(" -snapshot NAME Snapshot to restore."); System.err.println(" -copy-to NAME Remote destination hdfs://"); System.err.println(" -copy-from NAME Input folder hdfs:// (default hbase.rootdir)"); - System.err.println(" -no-checksum-verify Do not verify checksum."); + System.err.println(" -no-checksum-verify Do not verify checksum, use name+length only."); + System.err.println(" -skip-dst-verify Skip sanity-check post export"); System.err.println(" -overwrite Rewrite the snapshot manifest if already exists"); System.err.println(" -chuser USERNAME Change the owner of the files " + "to the specified one.");