Skip to content

Commit

Permalink
Ignore data locality in FileStreamSourceSuite
Browse files Browse the repository at this point in the history
  • Loading branch information
sunchao committed Oct 8, 2020
1 parent 8c8aa81 commit 5e299a2
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1282,6 +1282,7 @@ class FileStreamSourceSuite extends FileStreamSourceTest {
// This is to avoid running a spark job to list of files in parallel
// by the InMemoryFileIndex.
spark.sessionState.conf.setConf(SQLConf.PARALLEL_PARTITION_DISCOVERY_THRESHOLD, numFiles * 2)
spark.sessionState.conf.setConf(SQLConf.IGNORE_DATA_LOCALITY, true)

withTempDirs { case (root, tmp) =>
val src = new File(root, "a=1")
Expand Down Expand Up @@ -1946,6 +1947,7 @@ class FileStreamSourceSuite extends FileStreamSourceTest {
val originClassForLocalFileSystem = spark.conf.getOption(optionKey)
try {
spark.conf.set(optionKey, classOf[CountListingLocalFileSystem].getName)
spark.conf.set(SQLConf.IGNORE_DATA_LOCALITY.key, "true")
body
} finally {
originClassForLocalFileSystem match {
Expand Down

0 comments on commit 5e299a2

Please sign in to comment.