Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -722,11 +722,10 @@ protected void autoCorrectContainerAllocation(List<ResourceRequest> resourceRequ
if (allocatedContainers != null) {
for (RMContainer rmContainer : allocatedContainers) {
if (extraContainers > 0) {
// Change the state of the container from ALLOCATED to EXPIRED since it is not required.
// Change the state of the container from ALLOCATED to RELEASED
// since it is not required.
LOG.debug("Removing extra container:{}", rmContainer.getContainer());
completedContainer(rmContainer, SchedulerUtils.createAbnormalContainerStatus(
rmContainer.getContainerId(), SchedulerUtils.EXPIRED_CONTAINER),
RMContainerEventType.EXPIRE);
asyncContainerRelease(rmContainer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it cause the message at the end of the container to be different?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the message will be updated from "Container expired since it was unused" to "Container released by application", which I believe is more appropriate.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the message will be updated from "Container expired since it was unused" to "Container released by application", which I believe is more appropriate.

No, I think the old is more clear.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the old one, "expired since it was unused" is not accurate because it was released due to over-allocation, not because the waiting period expired. For the new one, "Container released by application" has been used in different scenarios that actively released by application, I think over-allocation could be included in this scope. @shameersss1 could you please share your thoughts about this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TaoYang526 +1
Container released makes more sense here.

application.newlyAllocatedContainers.remove(rmContainer);
extraContainers--;
}
Expand Down