-
Notifications
You must be signed in to change notification settings - Fork 425
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
TEZ-4250: Optimise TaskImpl::getCounters. #295
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. |
LGTM. +1 |
readLock.lock(); | ||
try { | ||
TaskAttempt bestAttempt = selectBestAttempt(); | ||
if (bestAttempt != null) { | ||
counters.incrAllCounters(bestAttempt.getCounters()); | ||
if (bestAttempt != null && tezCounters != null) { |
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.
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;
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.
done
thanks for the review @rbalamohan |
Change-Id: I5f9fdc7b3e257b33d67cf1dd1fd2c4f0923a9541
💔 -1 overall
This message was automatically generated. |
No description provided.