Repository: spark Updated Branches: refs/heads/master 8e6427871 -> 3e4f1666a
[MINOR] Fix Scala 2.12 build ## What changes were proposed in this pull request? [SPARK-25095](https://github.com/apache/spark/commit/ad45299d047c10472fd3a86103930fe7c54a4cf1) introduced `ambiguous reference to overloaded definition` ``` [error] /Users/d_tsai/dev/apache-spark/core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala:242: ambiguous reference to overloaded definition, [error] both method addTaskCompletionListener in class TaskContext of type [U](f: org.apache.spark.TaskContext => U)org.apache.spark.TaskContext [error] and method addTaskCompletionListener in class TaskContext of type (listener: org.apache.spark.util.TaskCompletionListener)org.apache.spark.TaskContext [error] match argument types (org.apache.spark.TaskContext => Unit) [error] context.addTaskCompletionListener(_ => server.close()) [error] ^ [error] one error found [error] Compile failed at Aug 24, 2018 1:56:06 PM [31.582s] ``` which fails the Scala 2.12 branch build. ## How was this patch tested? Existing tests Closes #22229 from dbtsai/fix-2.12-build. Authored-by: DB Tsai <d_t...@apple.com> Signed-off-by: hyukjinkwon <gurwls...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/3e4f1666 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/3e4f1666 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/3e4f1666 Branch: refs/heads/master Commit: 3e4f1666a1253f9d5df05c19b1ce77fe18e9fde3 Parents: 8e64278 Author: DB Tsai <d_t...@apple.com> Authored: Sat Aug 25 13:48:46 2018 +0800 Committer: hyukjinkwon <gurwls...@apache.org> Committed: Sat Aug 25 13:48:46 2018 +0800 ---------------------------------------------------------------------- core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/3e4f1666/core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala ---------------------------------------------------------------------- diff --git a/core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala b/core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala index f824191..151c910 100644 --- a/core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala +++ b/core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala @@ -239,7 +239,7 @@ private[spark] abstract class BasePythonRunner[IN, OUT]( } // Close ServerSocket on task completion. serverSocket.foreach { server => - context.addTaskCompletionListener(_ => server.close()) + context.addTaskCompletionListener[Unit](_ => server.close()) } val boundPort: Int = serverSocket.map(_.getLocalPort).getOrElse(0) if (boundPort == -1) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org