Package org.apache.hadoop.hbase.snapshot

Examples of org.apache.hadoop.hbase.snapshot.ExportSnapshotException


    // The snapshot references must be copied before the hfiles otherwise the cleaner
    // will remove them because they are unreferenced.
    try {
      FileUtil.copy(inputFs, snapshotDir, outputFs, snapshotTmpDir, false, false, conf);
    } catch (IOException e) {
      throw new ExportSnapshotException("Failed to copy the snapshot directory: from=" +
        snapshotDir + " to=" + snapshotTmpDir);
    }

    // Step 2 - Start MR Job to copy files
    // The snapshot references must be copied before the files otherwise the files gets removed
    // by the HFileArchiver, since they have no references.
    try {
      if (files.size() == 0) {
        LOG.warn("There are 0 store file to be copied. There may be no data in the table.");
      } else {
        runCopyJob(inputRoot, outputRoot, files, verifyChecksum,
                   filesUser, filesGroup, filesMode, mappers);
      }

      // Step 3 - Rename fs2:/.snapshot/.tmp/<snapshot> fs2:/.snapshot/<snapshot>
      if (!outputFs.rename(snapshotTmpDir, outputSnapshotDir)) {
        throw new ExportSnapshotException("Unable to rename snapshot directory from=" +
          snapshotTmpDir + " to=" + outputSnapshotDir);
      }
      return 0;
    } catch (Exception e) {
      LOG.error("Snapshot export failed", e);
View Full Code Here


      if (files.size() == 0) {
        LOG.warn("There are 0 store file to be copied. There may be no data in the table.");
      } else {
        if (!runCopyJob(inputRoot, outputRoot, files, verifyChecksum,
            filesUser, filesGroup, filesMode, mappers)) {
          throw new ExportSnapshotException("Snapshot export failed!");
        }
      }

      // Step 3 - Rename fs2:/.snapshot/.tmp/<snapshot> fs2:/.snapshot/<snapshot>
      if (!outputFs.rename(snapshotTmpDir, outputSnapshotDir)) {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.snapshot.ExportSnapshotException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.