Skip to content

Commit

Permalink
[SC-5715] Workaround Scala 2.10 specific sql/core compilation error
Browse files Browse the repository at this point in the history
## What changes were proposed in this pull request?

`DatabricksAtomicCommitProtocol.scala` doesn't compile under Scala 2.10 due to a Scala 2.10 compiler issue. This PR tries to workaround this issue.

## How was this patch tested?

N/A.

[1]: https://databricks.atlassian.net/browse/SC-5715

Author: Cheng Lian <lian@databricks.com>

Closes apache#191 from liancheng/workaround-fs-compilation-error.
  • Loading branch information
liancheng committed Jan 25, 2017
1 parent b333054 commit 25bf016
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import java.nio.charset.StandardCharsets
import scala.collection.mutable
import scala.util.control.NonFatal

import org.apache.hadoop.fs._
import org.apache.hadoop.fs.{FileSystem => HadoopFileSystem, _}
import org.apache.hadoop.mapreduce._
import org.json4s.NoTypeHints
import org.json4s.jackson.Serialization
Expand Down Expand Up @@ -79,7 +79,7 @@ class DatabricksAtomicCommitProtocol(jobId: String, path: String)
finalPath.toString
}

override def deleteWithJob(_fs: FileSystem, path: Path, recursive: Boolean): Boolean = {
override def deleteWithJob(_fs: HadoopFileSystem, path: Path, recursive: Boolean): Boolean = {
val fs = testingFs.getOrElse(_fs)
val sparkSession = SparkSession.getActiveSession.get
if (!sparkSession.sqlContext.getConf(
Expand Down

0 comments on commit 25bf016

Please sign in to comment.