-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
[SPARK-13901][CORE]correct the logDebug information when jump to the next locality level #11719
Conversation
@@ -557,7 +557,7 @@ private[spark] class TaskSetManager( | |||
lastLaunchTime += localityWaits(currentLocalityIndex) | |||
currentLocalityIndex += 1 | |||
logDebug(s"Moving to ${myLocalityLevels(currentLocalityIndex)} after waiting for " + | |||
s"${localityWaits(currentLocalityIndex)}ms") | |||
s"${localityWaits(currentLocalityIndex - 1)}ms") |
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.
Pull this out into a val
above, use it above, and then just reuse it here. It's clearer
I'm really sorry to make extra commits...Are these codes clearer ? |
} else if (curTime - lastLaunchTime >= localityWaits(currentLocalityIndex)) { | ||
// Jump to the next locality level, and reset lastLaunchTime so that the next locality | ||
// wait timer doesn't immediately expire | ||
lastLaunchTime += localityWaits(currentLocalityIndex) | ||
currentLocalityIndex += 1 | ||
logDebug(s"Moving to ${myLocalityLevels(currentLocalityIndex)} after waiting for " + | ||
s"${localityWaits(currentLocalityIndex)}ms") | ||
s"${localityWaits(previousLocalityIndex)}ms") |
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.
Ah OK, not quite what I meant. But, how about a slightly different idea. To match how the debug statement above works, leave it as-is, but then make this one:
logDebug(s"Moving to ${myLocalityLevels(currentLocalityIndex+1)} after waiting for " +
s"${localityWaits(currentLocalityIndex)}ms")
currentLocalityIndex += 1
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.
Oh,I got it ,thank you for help.
@srowen Ready for another look. |
Jenkins test this please |
Test build #53295 has finished for PR 11719 at commit
|
Jenkins retest this please |
Test build #53307 has finished for PR 11719 at commit
|
The error of "java.lang.IllegalArgumentException: requirement failed" is confusing,I just exchange two lines of codes..Actually am I wrong ? |
I'm certain this is an unrelated failure, but not sure why the failure occurs. It has happened on a few builds. |
@@ -555,9 +555,9 @@ private[spark] class TaskSetManager( | |||
// Jump to the next locality level, and reset lastLaunchTime so that the next locality | |||
// wait timer doesn't immediately expire | |||
lastLaunchTime += localityWaits(currentLocalityIndex) | |||
currentLocalityIndex += 1 | |||
logDebug(s"Moving to ${myLocalityLevels(currentLocalityIndex)} after waiting for " + | |||
logDebug(s"Moving to ${myLocalityLevels(currentLocalityIndex + 1)} after waiting for " + |
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.
haven't looked closely at this, but could currentLocalityIndex + 1 create an index out of bound for myLocalityLevels?
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.
Before, it was incremented first and then used as an index, and now it's increment afterwards, so it shouldn't be different. Really the net change is for the second part of the message to refer to the previous index, so should be OK.
… next locality level JIRA Issue:https://issues.apache.org/jira/browse/SPARK-13901 In getAllowedLocalityLevel method of TaskSetManager,we get wrong logDebug information when jump to the next locality level.So we should fix it. Author: trueyao <[email protected]> Closes #11719 from trueyao/logDebug-localityWait. (cherry picked from commit ea9ca6f) Signed-off-by: Sean Owen <[email protected]>
… next locality level JIRA Issue:https://issues.apache.org/jira/browse/SPARK-13901 In getAllowedLocalityLevel method of TaskSetManager,we get wrong logDebug information when jump to the next locality level.So we should fix it. Author: trueyao <[email protected]> Closes apache#11719 from trueyao/logDebug-localityWait.
JIRA Issue:https://issues.apache.org/jira/browse/SPARK-13901
In getAllowedLocalityLevel method of TaskSetManager,we get wrong logDebug information when jump to the next locality level.So we should fix it.