YARN-3986. getTransferredContainers in AbstractYarnScheduler should be present in YarnScheduler interface
This commit is contained in:
parent
b0564c9f3c
commit
22de7c1dca
@ -786,6 +786,9 @@ Release 2.8.0 - UNRELEASED
|
|||||||
YARN-4028. AppBlock page key update and diagnostics value null on recovery
|
YARN-4028. AppBlock page key update and diagnostics value null on recovery
|
||||||
(Bibin A Chundatt via xgong)
|
(Bibin A Chundatt via xgong)
|
||||||
|
|
||||||
|
YARN-3986. getTransferredContainers in AbstractYarnScheduler should be present
|
||||||
|
in YarnScheduler interface instead. (Varun Saxena via rohithsharmaks)
|
||||||
|
|
||||||
Release 2.7.2 - UNRELEASED
|
Release 2.7.2 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -89,7 +89,6 @@
|
|||||||
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.event.RMAppAttemptStatusupdateEvent;
|
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.event.RMAppAttemptStatusupdateEvent;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.event.RMAppAttemptUnregistrationEvent;
|
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.event.RMAppAttemptUnregistrationEvent;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode;
|
import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler;
|
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.Allocation;
|
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.Allocation;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNodeReport;
|
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNodeReport;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.YarnScheduler;
|
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.YarnScheduler;
|
||||||
@ -305,7 +304,7 @@ public RegisterApplicationMasterResponse registerApplicationMaster(
|
|||||||
// and corresponding NM tokens.
|
// and corresponding NM tokens.
|
||||||
if (app.getApplicationSubmissionContext()
|
if (app.getApplicationSubmissionContext()
|
||||||
.getKeepContainersAcrossApplicationAttempts()) {
|
.getKeepContainersAcrossApplicationAttempts()) {
|
||||||
List<Container> transferredContainers = ((AbstractYarnScheduler) rScheduler)
|
List<Container> transferredContainers = rScheduler
|
||||||
.getTransferredContainers(applicationAttemptId);
|
.getTransferredContainers(applicationAttemptId);
|
||||||
if (!transferredContainers.isEmpty()) {
|
if (!transferredContainers.isEmpty()) {
|
||||||
response.setContainersFromPreviousAttempts(transferredContainers);
|
response.setContainersFromPreviousAttempts(transferredContainers);
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport;
|
import org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport;
|
||||||
|
import org.apache.hadoop.yarn.api.records.Container;
|
||||||
import org.apache.hadoop.yarn.api.records.ContainerId;
|
import org.apache.hadoop.yarn.api.records.ContainerId;
|
||||||
import org.apache.hadoop.yarn.api.records.NodeId;
|
import org.apache.hadoop.yarn.api.records.NodeId;
|
||||||
import org.apache.hadoop.yarn.api.records.Priority;
|
import org.apache.hadoop.yarn.api.records.Priority;
|
||||||
@ -317,4 +318,14 @@ public Priority checkAndGetApplicationPriority(Priority priorityFromContext,
|
|||||||
*/
|
*/
|
||||||
public void updateApplicationPriority(Priority newPriority,
|
public void updateApplicationPriority(Priority newPriority,
|
||||||
ApplicationId applicationId) throws YarnException;
|
ApplicationId applicationId) throws YarnException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Get previous attempts' live containers for work-preserving AM restart.
|
||||||
|
*
|
||||||
|
* @param appAttemptId the id of the application attempt
|
||||||
|
*
|
||||||
|
* @return list of live containers for the given attempt
|
||||||
|
*/
|
||||||
|
List<Container> getTransferredContainers(ApplicationAttemptId appAttemptId);
|
||||||
}
|
}
|
||||||
|
@ -770,7 +770,7 @@ public void testRecoverSchedulerAppAndAttemptSynchronously() throws Exception {
|
|||||||
am0.getApplicationAttemptId()));
|
am0.getApplicationAttemptId()));
|
||||||
|
|
||||||
// getTransferredContainers should not throw NPE.
|
// getTransferredContainers should not throw NPE.
|
||||||
((AbstractYarnScheduler) rm2.getResourceScheduler())
|
rm2.getResourceScheduler()
|
||||||
.getTransferredContainers(am0.getApplicationAttemptId());
|
.getTransferredContainers(am0.getApplicationAttemptId());
|
||||||
|
|
||||||
List<NMContainerStatus> containers = createNMContainerStatusForApp(am0);
|
List<NMContainerStatus> containers = createNMContainerStatusForApp(am0);
|
||||||
|
Loading…
Reference in New Issue
Block a user