afedulov opened a new pull request #15054:
URL: https://github.com/apache/flink/pull/15054
## What is the purpose of the change
* Adds Flame Graphs to Flink in accordance to FLIP-165 [1].
## Brief change log
- Adds a new REST handler to `WebMonitorEnpoint`
- Adds a tracker as a results caching layer (`ThreadInfoOperatorTracker`)
- Adds a coordinator for sampling `ThreadInfo` of parallel operator
instances and assembling the results
- Extends `TaskExecutor` method for sampling `ThreadInfo` for a particular
`Task`
- Adds `ThreadInfoSampleService` for repeated sampling of a specific
`Task`
- Extends `JvmUtils` to enable data collection from a specific thread
- Adds data structures for assembling and transferring the results
(`ThredInfoSample`, `TaskThreadInfoResponse`, `OperatorThreadInfoStats`,
`OperatorFlameGraph`)
- Adds UI for displaying the sampling results
## Verifying this change
This change added tests and can be verified as follows:
- Added tests that validate that results are tracked (cached) correctly
- Added tests that validate that samples from the parallel tasks are
assembled correctly
- Added tests sampling of individual threads is performed correctly
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (yes, in the UI)
- 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, Kubernetes/Yarn/Mesos, ZooKeeper: (no)
- The S3 file system connector: (no)
## Documentation
- Does this pull request introduce a new feature? (yes)
- If yes, how is the feature documented? (not yet documented)
[1]
https://cwiki.apache.org/confluence/display/FLINK/FLIP-165%3A+Operator%27s+Flame+Graphs
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]