Package org.apache.hadoop.hbase.errorhandling

Examples of org.apache.hadoop.hbase.errorhandling.ForeignException$ProxyThrowable


        return true;
      } catch (InterruptedException e) {
        LOG.warn("Got InterruptedException in SnapshotSubprocedurePool", e);
        if (!stopped) {
          Thread.currentThread().interrupt();
          throw new ForeignException("SnapshotSubprocedurePool", e);
        }
        // we are stopped so we can just exit.
      } catch (ExecutionException e) {
        if (e.getCause() instanceof ForeignException) {
          LOG.warn("Rethrowing ForeignException from SnapshotSubprocedurePool", e);
          throw (ForeignException)e.getCause();
        }
        LOG.warn("Got Exception in SnapshotSubprocedurePool", e);
        throw new ForeignException(name, e.getCause());
      } finally {
        cancelTasks();
      }
      return false;
    }
View Full Code Here


    // wait for everything to complete.
    LOG.debug("Flush Snapshot Tasks submitted for " + regions.size() + " regions");
    try {
      taskManager.waitForOutstandingTasks();
    } catch (InterruptedException e) {
      throw new ForeignException(getMemberName(), e);
    }
  }
View Full Code Here

      completeSnapshot(this.snapshotDir, this.workingDir, this.fs);
    } catch (Exception e) {
      String reason = "Failed taking snapshot " + SnapshotDescriptionUtils.toString(snapshot)
          + " due to exception:" + e.getMessage();
      LOG.error(reason, e);
      ForeignException ee = new ForeignException(reason, e);
      monitor.receive(ee);
      // need to mark this completed to close off and allow cleanup to happen.
      cancel("Failed to take snapshot '" + SnapshotDescriptionUtils.toString(snapshot)
          + "' due to exception");
    } finally {
View Full Code Here

    this.finished = true;
    LOG.info("Stop taking snapshot=" + SnapshotDescriptionUtils.toString(snapshot) + " because: "
        + why);
    CancellationException ce = new CancellationException(why);
    monitor.receive(new ForeignException(master.getServerName().toString(), ce));
  }
View Full Code Here

      String msg = "clone snapshot=" + SnapshotDescriptionUtils.toString(snapshot) + " failed";
      LOG.error(msg, e);
      IOException rse = new RestoreSnapshotException(msg, e, snapshot);

      // these handlers aren't futures so we need to register the error here.
      this.monitor.receive(new ForeignException(NAME, rse));
      throw rse;
    }
  }
View Full Code Here

  @Override
  public void cancel(String why) {
    if (this.stopped) return;
    this.stopped = true;
    LOG.info("Stopping clone snapshot=" + snapshot + " because: " + why);
    this.monitor.receive(new ForeignException(NAME, new CancellationException(why)));
  }
View Full Code Here

        Bytes.toString(tableName) + " completed!");
    } catch (IOException e) {
      String msg = "restore snapshot=" + SnapshotDescriptionUtils.toString(snapshot)
          + " failed. Try re-running the restore command.";
      LOG.error(msg, e);
      monitor.receive(new ForeignException(masterServices.getServerName().toString(), e));
      throw new RestoreSnapshotException(msg, e);
    } finally {
      this.stopped = true;
    }
  }
View Full Code Here

    this.stopped = true;
    String msg = "Stopping restore snapshot=" + SnapshotDescriptionUtils.toString(snapshot)
        + " because: " + why;
    LOG.info(msg);
    CancellationException ce = new CancellationException(why);
    this.monitor.receive(new ForeignException(masterServices.getServerName().toString(), ce));
  }
View Full Code Here

      // wait for the snapshot to complete.  A timer thread is kicked off that should cancel this
      // if it takes too long.
      proc.waitForCompleted();
      LOG.info("Done waiting - snapshot for " + this.snapshot.getName() + " finished!");
    } catch (InterruptedException e) {
      ForeignException ee =
          new ForeignException("Interrupted while waiting for snapshot to finish", e);
      monitor.receive(ee);
      Thread.currentThread().interrupt();
    } catch (ForeignException e) {
      monitor.receive(e);
    }
View Full Code Here

      monitor.rethrowException();
    } catch (Exception e) {
      // make sure we capture the exception to propagate back to the client later
      String reason = "Failed snapshot " + SnapshotDescriptionUtils.toString(snapshot)
          + " due to exception:" + e.getMessage();
      ForeignException ee = new ForeignException(reason, e);
      monitor.receive(ee);
    } finally {
      LOG.debug("Marking snapshot" + SnapshotDescriptionUtils.toString(snapshot)
          + " as finished.");
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.errorhandling.ForeignException$ProxyThrowable

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.