return false;
}
}
private void sendCancelRpcCall() {
final AllocatedSlot slot = this.assignedResource;
if (slot == null) {
return;
}
Runnable cancelAction = new Runnable() {
@Override
public void run() {
Throwable exception = null;
for (int triesLeft = NUM_CANCEL_CALL_TRIES; triesLeft > 0; --triesLeft) {
try {
// send the call. it may be that the task is not really there (asynchronous / overtaking messages)
// in which case it is fine (the deployer catches it)
TaskOperationResult result = slot.getInstance().getTaskManagerProxy().cancelTask(attemptId);
if (!result.isSuccess()) {
// the task was not found, which may be when the task concurrently finishes or fails, or
// when the cancel call overtakes the deployment call
if (LOG.isDebugEnabled()) {