Skip to content

Commit 2d9e466

Browse files
rsotn-maprmgorbov
authored andcommitted
[MAPR-30583] InMemoryFileIndex changed to getFileBlockLocations in parallel way (apache#221)
1 parent 1b37b08 commit 2d9e466

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InMemoryFileIndex.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ object InMemoryFileIndex extends Logging {
278278
if (filter != null) allFiles.filter(f => filter.accept(f.getPath)) else allFiles
279279
}
280280

281-
allLeafStatuses.filterNot(status => shouldFilterOut(status.getPath.getName)).map {
281+
allLeafStatuses.par.filterNot(status => shouldFilterOut(status.getPath.getName)).map {
282282
case f: LocatedFileStatus =>
283283
f
284284

@@ -302,7 +302,7 @@ object InMemoryFileIndex extends Logging {
302302
lfs.setSymlink(f.getSymlink)
303303
}
304304
lfs
305-
}
305+
}.seq
306306
}
307307

308308
/** Checks if we should filter out this path name. */

0 commit comments

Comments
 (0)