Skip to content

Commit

Permalink
[SPARK-8425][SCHEDULER][HOTFIX] fix scala 2.10 compile error
Browse files Browse the repository at this point in the history
## What changes were proposed in this pull request?

apache@93cdb8a Introduced a compile error under scala 2.10, this fixes that error.

## How was this patch tested?

locally ran
```
dev/change-version-to-2.10.sh
build/sbt -Pyarn -Phadoop-2.4 -Dhadoop.version=2.6.0 -Dscala-2.10 "project yarn" "test-only *YarnAllocatorSuite"
```
(which failed at test compilation before this change)

Author: Imran Rashid <[email protected]>

Closes apache#16298 from squito/blacklist-2.10.
  • Loading branch information
squito authored and rxin committed Dec 15, 2016
1 parent 0917c8e commit 32ff964
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,13 @@ class YarnAllocatorSuite extends SparkFunSuite with Matchers with BeforeAndAfter
val mockAmClient = mock(classOf[AMRMClient[ContainerRequest]])
val handler = createAllocator(4, mockAmClient)
handler.requestTotalExecutorsWithPreferredLocalities(1, 0, Map(), Set("hostA"))
verify(mockAmClient).updateBlacklist(Seq("hostA").asJava, Seq().asJava)
verify(mockAmClient).updateBlacklist(Seq("hostA").asJava, Seq[String]().asJava)

handler.requestTotalExecutorsWithPreferredLocalities(2, 0, Map(), Set("hostA", "hostB"))
verify(mockAmClient).updateBlacklist(Seq("hostB").asJava, Seq().asJava)
verify(mockAmClient).updateBlacklist(Seq("hostB").asJava, Seq[String]().asJava)

handler.requestTotalExecutorsWithPreferredLocalities(3, 0, Map(), Set())
verify(mockAmClient).updateBlacklist(Seq().asJava, Seq("hostA", "hostB").asJava)
verify(mockAmClient).updateBlacklist(Seq[String]().asJava, Seq("hostA", "hostB").asJava)
}

test("memory exceeded diagnostic regexes") {
Expand Down

0 comments on commit 32ff964

Please sign in to comment.