MCPcopy Create free account
hub / github.com/apache/mesos / statusUpdate

Method statusUpdate

src/examples/java/TestFramework.java:144–174  ·  view source on GitHub ↗
(SchedulerDriver driver, TaskStatus status)

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls 4

stopMethod · 0.65
abortMethod · 0.65
getStateMethod · 0.45

Tested by

no test coverage detected