Package org.apache.hadoop.hbase.exceptions

Examples of org.apache.hadoop.hbase.exceptions.UnknownSnapshotException


   * @throws UnknownSnapshotException if snapshot is invalid or does not exist.
   */
  public boolean isSnapshotDone(SnapshotDescription expected) throws IOException {
    // check the request to make sure it has a snapshot
    if (expected == null) {
      throw new UnknownSnapshotException(
         "No snapshot name passed in request, can't figure out which snapshot you want to check.");
    }

    String ssString = ClientSnapshotDescriptionUtils.toString(expected);

    // check to see if the sentinel exists
    TakeSnapshotHandler handler = getTakeSnapshotHandler(expected);
    if (handler == null) {
      // doesn't exist, check if it is already completely done.
      if (!isSnapshotCompleted(expected)) {
        throw new UnknownSnapshotException("Snapshot " + ssString
            + " is not currently running or one of the known completed snapshots.");
      }
      // was done, return true;
      return true;
    }
View Full Code Here


      FileSystem fs = master.getMasterFileSystem().getFileSystem();

      // check to see if the snapshot already exists
      return fs.exists(snapshotDir);
    } catch (IllegalArgumentException iae) {
      throw new UnknownSnapshotException("Unexpected exception thrown", iae);
    }
  }
View Full Code Here

   * @throws IOException if there was some sort of IO failure
   */
  public boolean isRestoringTable(final SnapshotDescription snapshot) throws IOException {
    // check to see if the snapshot is already on the fs
    if (!isSnapshotCompleted(snapshot)) {
      throw new UnknownSnapshotException("Snapshot:" + snapshot.getName()
          + " is not one of the known completed snapshots.");
    }

    SnapshotSentinel sentinel = getRestoreSnapshotSentinel(snapshot.getTable());
    if (sentinel == null) {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.exceptions.UnknownSnapshotException

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.