File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 1717
1818package org .apache .spark .sql .execution .streaming
1919
20- import java .io .File
2120import java .nio .charset .StandardCharsets .UTF_8
2221
2322import org .apache .spark .SparkFunSuite
@@ -218,10 +217,10 @@ class FileStreamSinkLogSuite extends SparkFunSuite with SharedSQLContext {
218217 SQLConf .FILE_SINK_LOG_COMPACT_INTERVAL .key -> " 3" ,
219218 SQLConf .FILE_SINK_LOG_CLEANUP_DELAY .key -> " 0" ) {
220219 withFileStreamSinkLog { sinkLog =>
221- val metadataPath = new File ( sinkLog.metadataPath.toUri.toString )
220+ val fs = sinkLog.metadataPath.getFileSystem(sqlContext.sparkContext.hadoopConfiguration )
222221
223222 def listBatchFiles (): Set [String ] = {
224- metadataPath.listFiles( ).map(_.getName).filter { fileName =>
223+ fs.listStatus(sinkLog.metadataPath ).map(_.getPath .getName).filter { fileName =>
225224 try {
226225 getBatchIdFromFileName(fileName)
227226 true
You can’t perform that action at this time.
0 commit comments