-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-25449][CORE] Heartbeat shouldn't include accumulators for zero metrics #22473
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
Closed
Closed
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3e0d953
Don't send zero accumulators for metrics in heartbeat
mukulmurthy 3cf88a4
add tests
mukulmurthy fc98256
Refactor heartbeat configs and gate dropping zero metrics behind a co…
mukulmurthy 6bb91b0
update tests
mukulmurthy 7d0c39b
refactor code per Ryan's review
mukulmurthy db14bd1
minor refactor
mukulmurthy e22ac78
use PrivateMethodTester
mukulmurthy 9cbe14c
Use TestMemoryManager for test to not have to mock object field
mukulmurthy f6fa337
Use getTimeAsSeconds
mukulmurthy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -609,13 +609,13 @@ class SparkConf(loadDefaults: Boolean) extends Cloneable with Logging with Seria | |
| require(!encryptionEnabled || get(NETWORK_AUTH_ENABLED), | ||
| s"${NETWORK_AUTH_ENABLED.key} must be enabled when enabling encryption.") | ||
|
|
||
| val executorTimeoutThreshold = getTimeAsSeconds("spark.network.timeout", "120s") | ||
| val executorHeartbeatInterval = getTimeAsSeconds("spark.executor.heartbeatInterval", "10s") | ||
| val executorTimeoutThreshold = getTimeAsMs("spark.network.timeout", "120s") | ||
| val executorHeartbeatInterval = get(EXECUTOR_HEARTBEAT_INTERVAL) | ||
| // If spark.executor.heartbeatInterval bigger than spark.network.timeout, | ||
| // it will almost always cause ExecutorLostFailure. See SPARK-22754. | ||
| require(executorTimeoutThreshold > executorHeartbeatInterval, "The value of " + | ||
| s"spark.network.timeout=${executorTimeoutThreshold}s must be no less than the value of " + | ||
| s"spark.executor.heartbeatInterval=${executorHeartbeatInterval}s.") | ||
| s"spark.network.timeout=${executorTimeoutThreshold}ms must be no less than the value of " + | ||
|
||
| s"spark.executor.heartbeatInterval=${executorHeartbeatInterval}ms.") | ||
| } | ||
|
|
||
| /** | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you change
getTimeAsMsback togetTimeAsSeconds? There is a slight difference when the user doesn't specify the time unit.getTimeAsMsusesmsas default, whilegetTimeAsSecondsusesseconds.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part in the code only does some validation logic on the values and possibly throws an error. Because we changed it to use get(EXECUTOR_HEARTBEAT_INTERVAL), which returns the value in ms, I wanted the other one to return value in ms as well so we're comparing values in the same unit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use
getTimeAsSecondsand manually convert it toms?