Skip to content

[BEAM-7820] HotKeyDetection#9270

Merged
pabloem merged 19 commits intoapache:masterfrom
rohdesamuel:update-versions
Aug 8, 2019
Merged

[BEAM-7820] HotKeyDetection#9270
pabloem merged 19 commits intoapache:masterfrom
rohdesamuel:update-versions

Conversation

@rohdesamuel
Copy link
Contributor

@rohdesamuel rohdesamuel commented Aug 6, 2019

Adds HotKeyDetection to the StreamingDataflowWorker. Also moves the existing HotKeyDetection into a shared class between Batch and Streaming.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

Post-Commit Tests Status (on master branch)

Lang SDK Apex Dataflow Flink Gearpump Samza Spark
Go Build Status --- --- Build Status --- --- Build Status
Java Build Status Build Status Build Status Build Status
Build Status
Build Status
Build Status Build Status Build Status
Build Status
Python Build Status
Build Status
Build Status
Build Status
--- Build Status
Build Status
Build Status --- --- Build Status

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website
Non-portable Build Status Build Status Build Status Build Status
Portable --- Build Status --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

@rohdesamuel
Copy link
Contributor Author

R: @pabloem

@rohdesamuel
Copy link
Contributor Author

Run Java PreCommit

@rohdesamuel
Copy link
Contributor Author

Run Java_Examples_Dataflow PreCommit

@rohdesamuel
Copy link
Contributor Author

Run JavaPortabilityApi PreCommit

Copy link
Member

@pabloem pabloem left a comment

Choose a reason for hiding this comment

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

This generally looks fine to me. I left a couple comments : )

// The MapTask instruction is ordered by dependencies, such that the first element is
// always going to be the shuffle task.
String stepName = computationState.getMapTask().getInstructions().get(0).getName();
hotKeyLogger.logHotKeyDetection(stepName, hotKeyAge);
Copy link
Member

Choose a reason for hiding this comment

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

Is the stepName the correct step name that we want? (e.g. not s2, nor GroupByKey/ReadFromShuffle, but rather, the user-known GroupByKey step?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep! Just tested it, looks good! Also the comment for the "getName" specifies that it is the user-provided name.

if (isThrottled()) {
return;
}
LOG.warn(getHotKeyMessage(userStepName, TimeUtil.toCloudDuration(hotKeyAge)));
Copy link
Member

Choose a reason for hiding this comment

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

Is warning the right log level for this? It may be "normal", and acceptable to have a hot key - and when users see a warning they'll think something bad is happening. What do you think?

The same thing has happened with lull logging, where users think something's wrong - though that's not the case.

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 detection from the service is explicitly only when the hot key is causing slowness/ limited parallelism.

@pabloem pabloem merged commit 936110f into apache:master Aug 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants