|
@@ -20,6 +20,7 @@ package org.apache.hadoop.yarn.api.records;
|
|
|
|
|
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
|
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
|
import org.apache.hadoop.classification.InterfaceAudience.Public;
|
|
import org.apache.hadoop.classification.InterfaceAudience.Public;
|
|
|
|
+import org.apache.hadoop.classification.InterfaceStability.Evolving;
|
|
import org.apache.hadoop.classification.InterfaceStability.Stable;
|
|
import org.apache.hadoop.classification.InterfaceStability.Stable;
|
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
|
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
|
import org.apache.hadoop.yarn.api.ApplicationMasterProtocol;
|
|
import org.apache.hadoop.yarn.api.ApplicationMasterProtocol;
|
|
@@ -189,4 +190,48 @@ public abstract class Container implements Comparable<Container> {
|
|
@Private
|
|
@Private
|
|
@Unstable
|
|
@Unstable
|
|
public abstract void setExecutionType(ExecutionType executionType);
|
|
public abstract void setExecutionType(ExecutionType executionType);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Get the optional <em>ID</em> corresponding to the original {@code
|
|
|
|
+ * ResourceRequest{@link #getAllocationRequestId()}}s which is satisfied by
|
|
|
|
+ * this allocated {@code Container}.
|
|
|
|
+ * <p>
|
|
|
|
+ * The scheduler may return multiple {@code AllocateResponse}s corresponding
|
|
|
|
+ * to the same ID as and when scheduler allocates {@code Container}s.
|
|
|
|
+ * <b>Applications</b> can continue to completely ignore the returned ID in
|
|
|
|
+ * the response and use the allocation for any of their outstanding requests.
|
|
|
|
+ * <p>
|
|
|
|
+ *
|
|
|
|
+ * @return the <em>ID</em> corresponding to the original allocation request
|
|
|
|
+ * which is satisfied by this allocation.
|
|
|
|
+ */
|
|
|
|
+ @Public
|
|
|
|
+ @Evolving
|
|
|
|
+ public long getAllocationRequestId() {
|
|
|
|
+ throw new UnsupportedOperationException();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Set the optional <em>ID</em> corresponding to the original {@code
|
|
|
|
+ * ResourceRequest{@link #setAllocationRequestId(long)}
|
|
|
|
+ * etAllocationRequestId()}}s which is satisfied by this allocated {@code
|
|
|
|
+ * Container}.
|
|
|
|
+ * <p>
|
|
|
|
+ * The scheduler may return multiple {@code AllocateResponse}s corresponding
|
|
|
|
+ * to the same ID as and when scheduler allocates {@code Container}s.
|
|
|
|
+ * <b>Applications</b> can continue to completely ignore the returned ID in
|
|
|
|
+ * the response and use the allocation for any of their outstanding requests.
|
|
|
|
+ * If the ID is not set, scheduler will continue to work as previously and all
|
|
|
|
+ * allocated {@code Container}(s) will have the default ID, -1.
|
|
|
|
+ * <p>
|
|
|
|
+ *
|
|
|
|
+ * @param allocationRequestID the <em>ID</em> corresponding to the original
|
|
|
|
+ * allocation request which is satisfied by this
|
|
|
|
+ * allocation.
|
|
|
|
+ */
|
|
|
|
+ @Private
|
|
|
|
+ @Evolving
|
|
|
|
+ public void setAllocationRequestId(long allocationRequestID) {
|
|
|
|
+ throw new UnsupportedOperationException();
|
|
|
|
+ }
|
|
}
|
|
}
|