Skip to content

Conversation

@srowen
Copy link
Member

@srowen srowen commented Feb 18, 2016

What changes were proposed in this pull request?

Fix some comparisons between unequal types that cause IJ warnings and in at least one case a likely bug (TaskSetManager)

How was the this patch tested?

Running Jenkins tests

… in at least one case a likely bug (TaskSetManager)

// Test whether dependencies have been changed from its earlier parent RDD
assert(operatedRDD.dependencies.head.rdd != parentRDD)
assert(operatedRDD.dependencies.head != parentRDD)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please fix the original misnomer that encouraged this bad comparison: parentRDD is not an RDD, but rather a Dependency.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

@andrewor14
Copy link
Contributor

What are the implications of this bug? We never schedule anything rack local?

@srowen
Copy link
Member Author

srowen commented Feb 18, 2016

Good call, will make that change. Eh, yeah I'm not sure what the implication is but it doesn't sound great. Well, fix going in for sure.

// Check for rack-local tasks
if (TaskLocality.isAllowed(locality, TaskLocality.RACK_LOCAL)) {
for (rack <- sched.getRackForHost(host)) {
for (index <- speculatableTasks if canRunOnHost(index)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit, but I'd actually refactor this as a single for:

for {
  rack <- sched.getRackForHost(host)
  index <- speculatableTasks if canRunOnHost(index)
} {
  val racks = tasks(index).preferredLocations.map(_.host).flatMap(sched.getRackForHost)
  if (racks.contains(rack)) {
    speculatableTasks -= index
    return Some((index, TaskLocality.RACK_LOCAL))
  }
}

Copy link
Contributor

Choose a reason for hiding this comment

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

not a big deal but I think that can happen outside of this patch since it's just cleanup

Copy link
Contributor

Choose a reason for hiding this comment

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

yup, it's style, not substance

@SparkQA
Copy link

SparkQA commented Feb 18, 2016

Test build #51488 has finished for PR 11253 at commit 1135f21.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@andrewor14
Copy link
Contributor

LGTM

asfgit pushed a commit that referenced this pull request Feb 18, 2016
…pares Option and String directly.

## What changes were proposed in this pull request?

Fix some comparisons between unequal types that cause IJ warnings and in at least one case a likely bug (TaskSetManager)

## How was the this patch tested?

Running Jenkins tests

Author: Sean Owen <[email protected]>

Closes #11253 from srowen/SPARK-13371.

(cherry picked from commit 7856253)
Signed-off-by: Andrew Or <[email protected]>
@andrewor14
Copy link
Contributor

merged into master 1.6

@asfgit asfgit closed this in 7856253 Feb 18, 2016
@SparkQA
Copy link

SparkQA commented Feb 18, 2016

Test build #51494 has finished for PR 11253 at commit bd4b3fb.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen srowen deleted the SPARK-13371 branch February 19, 2016 10:28
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.

4 participants