/** * Return the percentage done that Slider is to have YARN display in its * Web UI * @return an number from 0 to 100 */ public synchronized float getApplicationProgressPercentage() { float percentage; long desired = 0; float actual = 0; for (RoleStatus role : getRoleStatusMap().values()) { desired += role.getDesired(); actual += role.getActual(); } if (desired == 0) { percentage = 100; } else { percentage = actual / desired; } return percentage; }
/** * Return the percentage done that Slider is to have YARN display in its * Web UI * @return an number from 0 to 100 */ public synchronized float getApplicationProgressPercentage() { float percentage; long desired = 0; float actual = 0; for (RoleStatus role : getRoleStatusMap().values()) { desired += role.getDesired(); actual += role.getActual(); } if (desired == 0) { percentage = 100; } else { percentage = actual / desired; } return percentage; }
resources.setComponentOpt(name, StatusKeys.COMPONENT_INSTANCES_ACTUAL, status.getActual()); resources.setComponentOpt(name, StatusKeys.COMPONENT_INSTANCES_RELEASING,
resources.setComponentOpt(name, StatusKeys.COMPONENT_INSTANCES_ACTUAL, status.getActual()); resources.setComponentOpt(name, StatusKeys.COMPONENT_INSTANCES_RELEASING,
.td().a(nameUrl, roleName)._() .td(String.format("%d", status.getDesired())) .td(String.format("%d", status.getActual())) .td(String.format("%d", status.getRequested())) .td(String.format("%d", status.getFailed()))
.td().a(nameUrl, roleName)._() .td(String.format("%d", status.getDesired())) .td(String.format("%d", status.getActual())) .td(String.format("%d", status.getRequested())) .td(String.format("%d", status.getFailed()))