(SchedulerDriver driver, TaskStatus status)
| 142 | public void offerRescinded(SchedulerDriver driver, OfferID offerId) {} |
| 143 | |
| 144 | @Override |
| 145 | public void statusUpdate(SchedulerDriver driver, TaskStatus status) { |
| 146 | System.out.println("Status update: task " + status.getTaskId().getValue() + |
| 147 | " is in state " + status.getState().getValueDescriptor().getName()); |
| 148 | if (status.getState() == TaskState.TASK_FINISHED) { |
| 149 | finishedTasks++; |
| 150 | |
| 151 | System.out.println("Finished tasks: " + finishedTasks); |
| 152 | if (finishedTasks == totalTasks) { |
| 153 | driver.stop(); |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | if (status.getState() == TaskState.TASK_LOST || |
| 158 | status.getState() == TaskState.TASK_KILLED || |
| 159 | status.getState() == TaskState.TASK_FAILED) { |
| 160 | System.err.println("Aborting because task " + status.getTaskId().getValue() + |
| 161 | " is in unexpected state " + |
| 162 | status.getState().getValueDescriptor().getName() + |
| 163 | " with reason '" + |
| 164 | status.getReason().getValueDescriptor().getName() + "'" + |
| 165 | " from source '" + |
| 166 | status.getSource().getValueDescriptor().getName() + "'" + |
| 167 | " with message '" + status.getMessage() + "'"); |
| 168 | driver.abort(); |
| 169 | } |
| 170 | |
| 171 | if (!implicitAcknowledgements) { |
| 172 | driver.acknowledgeStatusUpdate(status); |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | @Override |
| 177 | public void frameworkMessage(SchedulerDriver driver, |
nothing calls this directly
no test coverage detected