new OnDemandReportStringifier(instance); if (!inDesiredState) {
new OnDemandReportStringifier(instance); if (!inDesiredState) {
new SliderUtils.OnDemandReportStringifier(r)); duration.limit, desiredState, new SliderUtils.OnDemandReportStringifier(r)); return null;
new OnDemandReportStringifier(app)); if (app.getYarnApplicationState().ordinal() >= YarnApplicationState.FINISHED.ordinal()) {
new OnDemandReportStringifier(app)); if (app.getYarnApplicationState().ordinal() >= YarnApplicationState.FINISHED.ordinal()) {
new SliderUtils.OnDemandReportStringifier(r)); duration.limit, desiredState, new SliderUtils.OnDemandReportStringifier(r)); return null;
private boolean isAppInRunningState(String clustername) throws YarnException, IOException { // is this actually a known cluster? sliderFileSystem.locateInstanceDefinition(clustername); ApplicationReport app = findInstance(clustername); if (app == null) { // exit early log.info("Cluster {} not running", clustername); return false; } log.debug("App to upgrade was found: {}:\n{}", clustername, new OnDemandReportStringifier(app)); if (app.getYarnApplicationState().ordinal() >= YarnApplicationState.FINISHED.ordinal()) { log.info("Cluster {} is in a terminated state {}. Use command '{}' instead.", clustername, app.getYarnApplicationState(), ACTION_UPDATE); return false; } // IPC request to upgrade containers is possible if the app is running. if (app.getYarnApplicationState().ordinal() < YarnApplicationState.RUNNING .ordinal()) { log.info("Cluster {} is in a pre-running state {}. To upgrade it needs " + "to be RUNNING.", clustername, app.getYarnApplicationState()); return false; } return true; }
private boolean isAppInRunningState(String clustername) throws YarnException, IOException { // is this actually a known cluster? sliderFileSystem.locateInstanceDefinition(clustername); ApplicationReport app = findInstance(clustername); if (app == null) { // exit early log.info("Cluster {} not running", clustername); return false; } log.debug("App to upgrade was found: {}:\n{}", clustername, new OnDemandReportStringifier(app)); if (app.getYarnApplicationState().ordinal() >= YarnApplicationState.FINISHED.ordinal()) { log.info("Cluster {} is in a terminated state {}. Use command '{}' instead.", clustername, app.getYarnApplicationState(), ACTION_UPDATE); return false; } // IPC request to upgrade containers is possible if the app is running. if (app.getYarnApplicationState().ordinal() < YarnApplicationState.RUNNING .ordinal()) { log.info("Cluster {} is in a pre-running state {}. To upgrade it needs " + "to be RUNNING.", clustername, app.getYarnApplicationState()); return false; } return true; }