TEZ-4250: Optimise TaskImpl::getCounters.#295
Merged
abstractdog merged 4 commits intoapache:masterfrom Jun 23, 2023
Merged
Conversation
Change-Id: I7db4db3a4d2cb70f2e1d96fbaa2f853524fbce8a
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Change-Id: Ibaa0d6891658e1f54da883f9cc6b91eaa601c0ed
Change-Id: I1e36574b5fde496f52c155ff420d7434e067274f
This comment was marked as outdated.
This comment was marked as outdated.
|
💔 -1 overall
This message was automatically generated. |
Contributor
|
LGTM. +1 |
abstractdog
reviewed
Jun 23, 2023
| TaskAttempt bestAttempt = selectBestAttempt(); | ||
| if (bestAttempt != null) { | ||
| counters.incrAllCounters(bestAttempt.getCounters()); | ||
| if (bestAttempt != null && tezCounters != null) { |
Contributor
There was a problem hiding this comment.
tezCounters != null only if speculation is enabled due to the recent patch, would it make sense to use that condition here for better readability? I guess it would clarify that we only use "this.counter" and this whole stuff in case of speculation
also, we're returning a non-null counter anyway, would this be clearer as:
TezCounters taskCounters = (bestAttempt != null) ? bestAttempt.getCounters() : TaskAttemptImpl.EMPTY_COUNTERS;
if (isSpeculationEnabled){
tezCounters.incrAllCounters(taskCounters);
return tezCounters;
}
return taskCounters;
Contributor
|
thanks for the review @rbalamohan |
Change-Id: I5f9fdc7b3e257b33d67cf1dd1fd2c4f0923a9541
abstractdog
approved these changes
Jun 23, 2023
|
💔 -1 overall
This message was automatically generated. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.