Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-10848][YARN] properly remove YARN ContainerRequest upon container allocation success #7078

Closed
wants to merge 1 commit into from

Conversation

suez1224
Copy link

What is the purpose of the change

Properly remove YARN ContainerRequest upon container allocation success.

Brief change log

  • add call to removeContainerRequest in YarnFlinkResourceManager
  • add call to removeContainerRequest in YarnResourceManager
  • change unittests to verify,

Verifying this change

This change is already covered by existing tests.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): ( no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): ( no)
  • The serializers: ( no )
  • The runtime per-record code paths (performance sensitive): ( no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: ( no)
  • The S3 file system connector: ( no )

Documentation

  • Does this pull request introduce a new feature? ( no)
  • If yes, how is the feature documented? (not applicable )

@suez1224 suez1224 closed this Nov 11, 2018
@suez1224 suez1224 reopened this Nov 11, 2018
@suez1224 suez1224 force-pushed the removeContainerRequest branch 2 times, most recently from 61d6c05 to 1053b2b Compare November 13, 2018 03:19
@suez1224 suez1224 closed this Nov 13, 2018
@suez1224 suez1224 reopened this Nov 13, 2018
@suez1224 suez1224 closed this Nov 13, 2018
@suez1224 suez1224 reopened this Nov 13, 2018
@tillrohrmann tillrohrmann self-assigned this Nov 14, 2018
@@ -438,6 +438,8 @@ private void containersAllocated(List<Container> containers) {
numPendingContainerRequests = Math.max(0, numPendingContainerRequests - 1);
LOG.info("Received new container: {} - Remaining pending container requests: {}",
container.getId(), numPendingContainerRequests);
resourceManagerClient.removeContainerRequest(new AMRMClient.ContainerRequest(

Choose a reason for hiding this comment

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

Is this safe to create a new container request object ? Maybe we should call getMatchingRequests and remove one of the returned results.

Copy link
Author

Choose a reason for hiding this comment

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

getMatchingRequests only filter on priority, resourceName, capability. However, ContainerRequest also contains racks, nodes information.

@@ -361,7 +361,8 @@ public void onContainersAllocated(List<Container> containers) {
"Received new container: {} - Remaining pending container requests: {}",
container.getId(),
numPendingContainerRequests);

resourceManagerClient.removeContainerRequest(new AMRMClient.ContainerRequest(

Choose a reason for hiding this comment

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

maybe we can move this removeContainerRequest before this for loop, use a indepedent for loop to do this remove staff.

Suggested change
resourceManagerClient.removeContainerRequest(new AMRMClient.ContainerRequest(
resourceManagerClient.removeContainerRequest(new AMRMClient.ContainerRequest(

@asfgit asfgit closed this in e26d90f Jan 4, 2019
@suez1224
Copy link
Author

suez1224 commented Jan 4, 2019

Thanks a lot for all the reviews. We've tested the branch in production for some time, merging into the master now.

asfgit pushed a commit that referenced this pull request Jan 5, 2019
asfgit pushed a commit that referenced this pull request Jan 5, 2019
JTaky pushed a commit to JTaky/flink that referenced this pull request Jan 14, 2019
tisonkun pushed a commit to tisonkun/flink that referenced this pull request Jan 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants