private void checkRMStatus(String user, String argName, String msg) throws StandbyException { if (!isRMActive()) { RMAuditLogger.logFailure(user, argName, "", "AdminService", "ResourceManager is not active. Can not " + msg); throwStandbyException(); } }
private void checkRMStatus(String user, String argName, String msg) throws StandbyException { if (!isRMActive()) { RMAuditLogger.logFailure(user, argName, "", "AdminService", "ResourceManager is not active. Can not " + msg); throwStandbyException(); } }
private void checkRMStatus(String user, String operation, String msg) throws StandbyException { if (!isRMActive()) { RMAuditLogger.logFailure(user, operation, "", "AdminService", "ResourceManager is not active. Can not " + msg); throwStandbyException(); } }
@Override public synchronized void monitorHealth() throws IOException { checkAccess("monitorHealth"); if (isRMActive() && !rm.areActiveServicesRunning()) { throw new HealthCheckFailedException( "Active ResourceManager services are not running!"); } }
@Override public synchronized void monitorHealth() throws IOException { checkAccess("monitorHealth"); if (isRMActive() && !rm.areActiveServicesRunning()) { throw new HealthCheckFailedException( "Active ResourceManager services are not running!"); } }
@Override public synchronized void monitorHealth() throws IOException { checkAccess("monitorHealth"); if (isRMActive() && !rm.areActiveServicesRunning()) { throw new HealthCheckFailedException( "Active ResourceManager services are not running!"); } }
@Override public synchronized HAServiceStatus getServiceStatus() throws IOException { checkAccess("getServiceState"); HAServiceState haState = rmContext.getHAServiceState(); HAServiceStatus ret = new HAServiceStatus(haState); if (isRMActive() || haState == HAServiceProtocol.HAServiceState.STANDBY) { ret.setReadyToBecomeActive(); } else { ret.setNotReadyToBecomeActive("State is " + haState); } return ret; }
@Override public synchronized HAServiceStatus getServiceStatus() throws IOException { checkAccess("getServiceState"); HAServiceState haState = rmContext.getHAServiceState(); HAServiceStatus ret = new HAServiceStatus(haState); if (isRMActive() || haState == HAServiceProtocol.HAServiceState.STANDBY) { ret.setReadyToBecomeActive(); } else { ret.setNotReadyToBecomeActive("State is " + haState); } return ret; }
/** * Return the HA status of this RM. This includes the current state and * whether the RM is ready to become active. * * @return {@link HAServiceStatus} of the current RM * @throws IOException if the caller does not have permissions */ @Override public synchronized HAServiceStatus getServiceStatus() throws IOException { checkAccess("getServiceState"); HAServiceState haState = rm.getRMContext().getHAServiceState(); HAServiceStatus ret = new HAServiceStatus(haState); if (isRMActive() || haState == HAServiceProtocol.HAServiceState.STANDBY) { ret.setReadyToBecomeActive(); } else { ret.setNotReadyToBecomeActive("State is " + haState); } return ret; }
public synchronized void transitionToActive( HAServiceProtocol.StateChangeRequestInfo reqInfo) throws IOException { if (isRMActive()) { return;
public synchronized void transitionToActive( HAServiceProtocol.StateChangeRequestInfo reqInfo) throws IOException { if (isRMActive()) { return;