Package org.apache.hadoop.hbase.master

Examples of org.apache.hadoop.hbase.master.AssignmentManager.regionOffline()


      getLong("hbase.master.wait.on.region", 5 * 60 * 1000);
    for (HRegionInfo region : regions) {
      long done = System.currentTimeMillis() + waitTime;
      while (System.currentTimeMillis() < done) {
        if (states.isRegionInState(region, State.FAILED_OPEN)) {
          am.regionOffline(region);
        }
        if (!states.isRegionInTransition(region)) break;
        Threads.sleep(waitingTimeForEvents);
        LOG.debug("Waiting on region to clear regions in transition; "
          + am.getRegionStates().getRegionTransitionState(region));
View Full Code Here


      // Assign meta if we were carrying it.
      // Check again: region may be assigned to other where because of RIT
      // timeout
      if (am.isCarryingMeta(serverName)) {
        LOG.info("Server " + serverName + " was carrying META. Trying to assign.");
        am.regionOffline(HRegionInfo.FIRST_META_REGIONINFO);
        verifyAndAssignMetaWithRetries();
      } else if (!this.services.getCatalogTracker().isMetaLocationAvailable()) {
        // the meta location as per master is null. This could happen in case when meta assignment
        // in previous run failed, while meta znode has been updated to null. We should try to
        // assign the meta again.
View Full Code Here

            // but the RS had gone down before completing the split process then will not try to
            // assign the parent region again. In that case we should make the region offline and
            // also delete the region from RIT.
            HRegionInfo region = rit.getRegion();
            AssignmentManager am = this.services.getAssignmentManager();
            am.regionOffline(region);
          }
          // If the table was partially disabled and the RS went down, we should clear the RIT
          // and remove the node for the region.
          // The rit that we use may be stale in case the table was in DISABLING state
          // but though we did assign we will not be clearing the znode in CLOSING state.
View Full Code Here

              && this.services.getAssignmentManager().getZKTable()
                  .isDisablingOrDisabledTable(rit.getRegion().getTableNameAsString())) {
            HRegionInfo hri = rit.getRegion();
            AssignmentManager am = this.services.getAssignmentManager();
            am.deleteClosingOrClosedNode(hri);
            am.regionOffline(hri);
          }
        }
      }
    } finally {
      this.deadServers.finish(serverName);
View Full Code Here

      getLong("hbase.master.wait.on.region", 5 * 60 * 1000);
    for (HRegionInfo region : regions) {
      long done = System.currentTimeMillis() + waitTime;
      while (System.currentTimeMillis() < done) {
        if (states.isRegionInState(region, State.FAILED_OPEN)) {
          am.regionOffline(region);
        }
        if (!states.isRegionInTransition(region)) break;
        try {
          Thread.sleep(waitingTimeForEvents);
        } catch (InterruptedException e) {
View Full Code Here

            // but the RS had gone down before completing the split process then will not try to
            // assign the parent region again. In that case we should make the region offline and
            // also delete the region from RIT.
            HRegionInfo region = rit.getRegion();
            AssignmentManager am = this.services.getAssignmentManager();
            am.regionOffline(region);
          }
        }
      }
    } finally {
      this.deadServers.finish(serverName);
View Full Code Here

  private void forceRegionsOffline(final List<HRegionInfo> hris) {
    AssignmentManager am = this.masterServices.getAssignmentManager();
    if (hris != null) {
      for (HRegionInfo hri: hris) {
        am.regionOffline(hri);
      }
    }
  }

  @Override
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.