Examples of ForeignExceptionDispatcher


Examples of org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcher

    FSUtils.logFileSystemState(fs, testDir, LOG);
    FSUtils.setRootDir(conf, testDir);
    SnapshotDescription snapshot = SnapshotDescription.newBuilder()
        .setName("testWALReferenceSnapshot").build();
    ForeignExceptionDispatcher listener = Mockito.mock(ForeignExceptionDispatcher.class);

    // reference all the files in the first server directory
    ReferenceServerWALsTask task = new ReferenceServerWALsTask(snapshot, listener, server1Dir,
        conf, fs);
    task.call();
View Full Code Here

Examples of org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcher

   */
  private RestoreSnapshotHelper getRestoreHelper(final Path rootDir, final Path snapshotDir,
      final String sourceTableName, final HTableDescriptor htdClone) throws IOException {
    CatalogTracker catalogTracker = Mockito.mock(CatalogTracker.class);
    HTableDescriptor tableDescriptor = Mockito.mock(HTableDescriptor.class);
    ForeignExceptionDispatcher monitor = Mockito.mock(ForeignExceptionDispatcher.class);

    SnapshotDescription sd = SnapshotDescription.newBuilder()
      .setName("snapshot").setTable(sourceTableName).build();

    return new RestoreSnapshotHelper(conf, fs, sd, snapshotDir,
View Full Code Here

Examples of org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcher

  @Test
  public void testCopyFiles() throws Exception {

    SnapshotDescription snapshot = SnapshotDescription.newBuilder().setName("snapshot").build();
    ForeignExceptionDispatcher monitor = Mockito.mock(ForeignExceptionDispatcher.class);
    FileSystem fs = UTIL.getTestFileSystem();
    Path root = UTIL.getDataTestDir();
    String regionName = "regionA";
    Path regionDir = new Path(root, regionName);
    Path workingDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(snapshot, root);
View Full Code Here

Examples of org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcher

   * @throws Exception on failure
   */
  @Test
  public void testNoEditsDir() throws Exception {
    SnapshotDescription snapshot = SnapshotDescription.newBuilder().setName("snapshot").build();
    ForeignExceptionDispatcher monitor = Mockito.mock(ForeignExceptionDispatcher.class);
    FileSystem fs = UTIL.getTestFileSystem();
    Path root = UTIL.getDataTestDir();
    String regionName = "regionA";
    Path regionDir = new Path(root, regionName);
    Path workingDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(snapshot, root);
View Full Code Here

Examples of org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcher

    Path snapshotRegionDir = new Path(testdir, HConstants.SNAPSHOT_DIR_NAME);
    fs.mkdirs(snapshotRegionDir);

    SnapshotDescription snapshot = SnapshotDescription.newBuilder().setName("name")
        .setTable("table").build();
    ForeignExceptionDispatcher monitor = Mockito.mock(ForeignExceptionDispatcher.class);
    ReferenceRegionHFilesTask task = new ReferenceRegionHFilesTask(snapshot, monitor, regionDir,
        fs, snapshotRegionDir);
    ReferenceRegionHFilesTask taskSpy = Mockito.spy(task);
    task.call();
View Full Code Here

Examples of org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcher

  /**
   * Check that errors from running the task get propagated back to the error listener.
   */
  @Test
  public void testErrorPropagation() throws Exception {
    ForeignExceptionDispatcher error = mock(ForeignExceptionDispatcher.class);
    SnapshotDescription snapshot = SnapshotDescription.newBuilder().setName("snapshot")
        .setTable("table").build();
    final Exception thrown = new Exception("Failed!");
    SnapshotTask fail = new SnapshotTask(snapshot, error) {
      @Override
View Full Code Here

Examples of org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcher

    this.conf = this.master.getConfiguration();
    this.fs = this.master.getMasterFileSystem().getFileSystem();
    this.rootDir = this.master.getMasterFileSystem().getRootDir();
    this.snapshotDir = SnapshotDescriptionUtils.getCompletedSnapshotDir(snapshot, rootDir);
    this.workingDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(snapshot, rootDir);
    this.monitor = new ForeignExceptionDispatcher(snapshot.getName());

    this.tableLockManager = master.getTableLockManager();
    this.tableLock = this.tableLockManager.writeLock(
        snapshotTable,
        EventType.C_M_SNAPSHOT_TABLE.toString());
View Full Code Here

Examples of org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcher

   * @param args argument data associated with the procedure instance
   * @param expectedMembers names of the expected members
   */
  public Procedure(ProcedureCoordinator coord, long wakeFreq, long timeout,
      String procName, byte[] args, List<String> expectedMembers) {
    this(coord, new ForeignExceptionDispatcher(), wakeFreq, timeout, procName, args,
        expectedMembers);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcher

    // expects participation in the procedure and without sending message the snapshot attempt
    // will hang and fail.

    LOG.debug("Launching subprocedure for snapshot " + snapshot.getName() + " from table "
        + snapshot.getTable());
    ForeignExceptionDispatcher exnDispatcher = new ForeignExceptionDispatcher(snapshot.getName());
    Configuration conf = rss.getConfiguration();
    long timeoutMillis = conf.getLong(SNAPSHOT_TIMEOUT_MILLIS_KEY,
        SNAPSHOT_TIMEOUT_MILLIS_DEFAULT);
    long wakeMillis = conf.getLong(SNAPSHOT_REQUEST_WAKE_MILLIS_KEY,
        SNAPSHOT_REQUEST_WAKE_MILLIS_DEFAULT);
View Full Code Here

Examples of org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcher

    this.conf = this.master.getConfiguration();
    this.fs = this.master.getMasterFileSystem().getFileSystem();
    this.rootDir = this.master.getMasterFileSystem().getRootDir();
    this.snapshotDir = SnapshotDescriptionUtils.getCompletedSnapshotDir(snapshot, rootDir);
    this.workingDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(snapshot, rootDir);
    this.monitor = new ForeignExceptionDispatcher(snapshot.getName());

    this.tableLockManager = master.getTableLockManager();
    this.tableLock = this.tableLockManager.writeLock(
        snapshotTable,
        EventType.C_M_SNAPSHOT_TABLE.toString());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.