/** * If hbase:meta is not assigned already, assign. * @throws InterruptedException * @throws IOException * @throws KeeperException */ private void verifyAndAssignMeta(final MasterProcedureEnv env) throws InterruptedException, IOException, KeeperException { MasterServices services = env.getMasterServices(); if (!isMetaAssignedQuickTest(env)) { services.getAssignmentManager().assignMeta(HRegionInfo.FIRST_META_REGIONINFO); } else if (serverName.equals(services.getMetaTableLocator(). getMetaRegionLocation(services.getZooKeeper()))) { // hbase:meta seems to be still alive on the server whom master is expiring // and thinks is dying. Let's re-assign the hbase:meta anyway. services.getAssignmentManager().assignMeta(HRegionInfo.FIRST_META_REGIONINFO); } else { LOG.info("Skip assigning hbase:meta because it is online at " + services.getMetaTableLocator().getMetaRegionLocation(services.getZooKeeper())); } }
private void assignMetaZkLess(RegionStates regionStates, RegionState regionState, long timeout, Set<ServerName> previouslyFailedRs) throws IOException, KeeperException { ServerName currentServer = regionState.getServerName(); if (serverManager.isServerOnline(currentServer)) { LOG.info("Meta was in transition on " + currentServer); assignmentManager.processRegionInTransitionZkLess(); } else { if (currentServer != null) { if (regionState.getRegion().getReplicaId() == HRegionInfo.DEFAULT_REPLICA_ID) { splitMetaLogBeforeAssignment(currentServer); regionStates.logSplit(HRegionInfo.FIRST_META_REGIONINFO); previouslyFailedRs.add(currentServer); } } LOG.info("Re-assigning hbase:meta, it was on " + currentServer); regionStates.updateRegionState(regionState.getRegion(), State.OFFLINE); assignmentManager.assignMeta(regionState.getRegion()); } }
this.services.getAssignmentManager().regionOffline( HRegionInfo.FIRST_META_REGIONINFO); this.services.getAssignmentManager().assignMeta(); } else { LOG.info("META has been assigned to otherwhere, skip assigning.");
splitLogAndExpireIfOnline(currentMetaServer); assignmentManager.assignMeta(); enableSSHandWaitForMeta(); assigned++;
assignmentManager.assignMeta(hri);