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-8089] Also check for other pending slot requests in SlotPool#offerSlot #5090

Merged
merged 5 commits into from Dec 14, 2017

Conversation

tillrohrmann
Copy link
Contributor

What is the purpose of the change

Not only check for a slot request with the right allocation id but also check
whether we can fulfill other pending slot requests with an unclaimed offered
slot before adding it to the list of available slots in SlotPool.

This PR is based on #5089.

Verifying this change

  • Added SlotPoolTest#testFulfillingSlotRequestsWithUnusedOfferedSlots to check that unused offered slots are directly used to fulfill other pending slot requests

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: (yes)
  • 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)

CC: @GJL

tillrohrmann added a commit to tillrohrmann/flink that referenced this pull request Dec 1, 2017
Not only check for a slot request with the right allocation id but also check
whether we can fulfill other pending slot requests with an unclaimed offered
slot before adding it to the list of available slots.

This closes apache#5090.
tillrohrmann added a commit to tillrohrmann/flink that referenced this pull request Dec 1, 2017
Not only check for a slot request with the right allocation id but also check
whether we can fulfill other pending slot requests with an unclaimed offered
slot before adding it to the list of available slots.

This closes apache#5090.
tillrohrmann added a commit to tillrohrmann/flink that referenced this pull request Dec 3, 2017
Not only check for a slot request with the right allocation id but also check
whether we can fulfill other pending slot requests with an unclaimed offered
slot before adding it to the list of available slots.

This closes apache#5090.
@@ -383,6 +386,76 @@ public void testSlotRequestCancellationUponFailingRequest() throws Exception {
}
}

/**
* Tests that unused offered slots are directly used to fulfil pending slot
Copy link
Member

@GJL GJL Dec 7, 2017

Choose a reason for hiding this comment

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

nit: Inconsistent British and American English
fulfill instead of fulfil

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, will use the american version


assertTrue(slotPoolGateway.offerSlot(taskManagerLocation, taskManagerGateway, slotOffer).get());

// the slot offer should fulfil the second slot request
Copy link
Member

Choose a reason for hiding this comment

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

nit: same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same here.

tillrohrmann added a commit to tillrohrmann/flink that referenced this pull request Dec 14, 2017
Not only check for a slot request with the right allocation id but also check
whether we can fulfill other pending slot requests with an unclaimed offered
slot before adding it to the list of available slots.

This closes apache#5090.
The cluster entrypoints start the ResourceManager with the web interface URL.
This URL is used to set the correct tracking URL in Yarn when registering the
Yarn application.

This closes apache#5128.
This commit introduces the SlotContext which is an abstraction for the SimpleSlot
to obtain the relevant slot information to do the communication with the
TaskManager without relying on the AllocatedSlot which is now only used by the
SlotPool.

This closes apache#5088.
Before logical slots like the SimpleSlot and SharedSlot where associated to the
actually allocated slot via the AllocationID. This, however, was sub-optimal because
allocated slots can be re-used to fulfill also other slot requests (logical slots).
Therefore, we should bind the logical slots to the right id with the right lifecycle
which is the slot request id.

This closes apache#5089.
Not only check for a slot request with the right allocation id but also check
whether we can fulfill other pending slot requests with an unclaimed offered
slot before adding it to the list of available slots.

This closes apache#5090.
@tillrohrmann
Copy link
Contributor Author

Thanks for the review @GJL. Merging this PR.

@asfgit asfgit merged commit 331ce82 into apache:master Dec 14, 2017
@tillrohrmann tillrohrmann deleted the fixSlotOffering branch December 14, 2017 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants