|
@@ -37,6 +37,7 @@ import org.apache.hadoop.yarn.api.records.ContainerId;
|
|
|
import org.apache.hadoop.yarn.api.records.ContainerStatus;
|
|
|
import org.apache.hadoop.yarn.api.records.FinalApplicationStatus;
|
|
|
import org.apache.hadoop.yarn.api.records.NodeReport;
|
|
|
+import org.apache.hadoop.yarn.api.records.PreemptionMessage;
|
|
|
import org.apache.hadoop.yarn.api.records.Priority;
|
|
|
import org.apache.hadoop.yarn.api.records.RejectedSchedulingRequest;
|
|
|
import org.apache.hadoop.yarn.api.records.Resource;
|
|
@@ -401,6 +402,14 @@ extends AMRMClientAsync<T> {
|
|
|
handler.onContainersAllocated(allocated);
|
|
|
}
|
|
|
|
|
|
+ PreemptionMessage preemptionMessage = response.getPreemptionMessage();
|
|
|
+ if (preemptionMessage != null) {
|
|
|
+ if (handler instanceof AMRMClientAsync.AbstractCallbackHandler) {
|
|
|
+ ((AMRMClientAsync.AbstractCallbackHandler) handler)
|
|
|
+ .onPreemptionMessageReceived(preemptionMessage);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (!response.getContainersFromPreviousAttempts().isEmpty()) {
|
|
|
if (handler instanceof AMRMClientAsync.AbstractCallbackHandler) {
|
|
|
((AMRMClientAsync.AbstractCallbackHandler) handler)
|