public void handleTransitionToStandBy() { if (rmContext.isHAEnabled()) { try { // Transition to standby and reinit active services LOG.info("Transitioning RM to Standby mode"); transitionToStandby(true); adminService.resetLeaderElection(); return; } catch (Exception e) { LOG.fatal("Failed to transition RM to Standby mode."); ExitUtil.terminate(1, e); } } }
public void handleTransitionToStandBy() { if (rmContext.isHAEnabled()) { try { // Transition to standby and reinit active services LOG.info("Transitioning RM to Standby mode"); transitionToStandby(true); adminService.resetLeaderElection(); return; } catch (Exception e) { LOG.fatal("Failed to transition RM to Standby mode."); ExitUtil.terminate(1, e); } } }
@Override public void run() { // Run this only once, even if multiple threads end up triggering // this simultaneously. if (hasAlreadyRun.getAndSet(true)) { return; } if (rmContext.isHAEnabled()) { try { // Transition to standby and reinit active services LOG.info("Transitioning RM to Standby mode"); transitionToStandby(true); EmbeddedElector elector = rmContext.getLeaderElectorService(); if (elector != null) { elector.rejoinElection(); } } catch (Exception e) { LOG.fatal("Failed to transition RM to Standby mode.", e); ExitUtil.terminate(1, e); } } } }
@Override protected void serviceStart() throws Exception { if (this.rmContext.isHAEnabled()) { transitionToStandby(false); } startWepApp(); if (getConfig().getBoolean(YarnConfiguration.IS_MINI_YARN_CLUSTER, false)) { int port = webApp.port(); WebAppUtils.setRMWebAppPort(conf, port); } super.serviceStart(); // Non HA case, start after RM services are started. if (!this.rmContext.isHAEnabled()) { transitionToActive(); } }
@Override protected void serviceStart() throws Exception { if (this.rmContext.isHAEnabled()) { transitionToStandby(true); } else { transitionToActive(); } startWepApp(); if (getConfig().getBoolean(YarnConfiguration.IS_MINI_YARN_CLUSTER, false)) { int port = webApp.port(); WebAppUtils.setRMWebAppPort(conf, port); } super.serviceStart(); }
@Override protected void serviceStart() throws Exception { if (this.rmContext.isHAEnabled()) { transitionToStandby(true); } else { transitionToActive(); } startWepApp(); if (getConfig().getBoolean(YarnConfiguration.IS_MINI_YARN_CLUSTER, false)) { int port = webApp.port(); WebAppUtils.setRMWebAppPort(conf, port); } super.serviceStart(); }
if (this.rmContext.isHAEnabled()) { HAUtil.verifyAndSetConfiguration(this.conf);
if (this.rmContext.isHAEnabled()) { HAUtil.verifyAndSetConfiguration(this.conf);
if (this.rmContext.isHAEnabled()) { HAUtil.verifyAndSetConfiguration(this.conf); if (this.rmContext.isHAEnabled()) {