GitHub user zentol opened a pull request:
https://github.com/apache/flink/pull/5699
[FLINK-8942][runtime] Pass heartbeat target ResourceID
## What is the purpose of the change
With this PR the heartbeat target `ResourceID` is passed to the
`HeartbeatListener` when retrieving the payload so send. This allows the
listener to create target-dependent payloads.
The primary use-case is FLINK-8881, where accumulators are sent via
heartbeats to the JobManager. Here we only want to send accumulators for the
relevant job, and not for all jobs.
## Brief change log
* add a `ResourceID` parameter to `HeartbeatListener#retrievePayload`
* modify return type of `HeartbeatManagerImpl#getHeartbeatTargets` to also
contain the target `ResourceID`
## Verifying this change
This change added tests:
`HeartbeatManagerTest`:
* `testHeartbeatManagerTargetPayload`
* `testHeartbeatManagerSenderTargetPayload`
## 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)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zentol/flink 8942
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/5699.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #5699
----
commit d264dbbd260abc995ced8095a220260e8e0b3f1a
Author: zentol <chesnay@...>
Date: 2018-03-14T13:21:27Z
[FLINK-8942][runtime] Pass heartbeat target ResourceID
----
---