LOG.info("Received empty framework message.");
return;
}
try {
SchedulerMessage schedulerMsg = ThriftBinaryCodec.decode(SchedulerMessage.class, data);
if (schedulerMsg == null || !schedulerMsg.isSet()) {
LOG.warning("Received empty scheduler message.");
return;
}
if (schedulerMsg.getSetField() == _Fields.DELETED_TASKS) {
for (String taskId : schedulerMsg.getDeletedTasks().getTaskIds()) {
stateManager.changeState(
taskId,
Optional.<ScheduleStatus>absent(),
ScheduleStatus.SANDBOX_DELETED,
Optional.of("Sandbox disk space reclaimed."));
}
} else {
LOG.warning("Received unhandled scheduler message type: " + schedulerMsg.getSetField());
}
} catch (ThriftBinaryCodec.CodingException e) {
LOG.log(Level.SEVERE, "Failed to decode framework message.", e);
}
}