From 2d9e466611719307f96fd362413fa7ab0be2100d Mon Sep 17 00:00:00 2001 From: Rostyslav Sotnychenko Date: Wed, 7 Feb 2018 15:40:40 +0200 Subject: [PATCH] [MAPR-30583] InMemoryFileIndex changed to getFileBlockLocations in parallel way (#221) --- .../spark/sql/execution/datasources/InMemoryFileIndex.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InMemoryFileIndex.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InMemoryFileIndex.scala index 91e31650617ec..5cf8901cb31c5 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InMemoryFileIndex.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InMemoryFileIndex.scala @@ -278,7 +278,7 @@ object InMemoryFileIndex extends Logging { if (filter != null) allFiles.filter(f => filter.accept(f.getPath)) else allFiles } - allLeafStatuses.filterNot(status => shouldFilterOut(status.getPath.getName)).map { + allLeafStatuses.par.filterNot(status => shouldFilterOut(status.getPath.getName)).map { case f: LocatedFileStatus => f @@ -302,7 +302,7 @@ object InMemoryFileIndex extends Logging { lfs.setSymlink(f.getSymlink) } lfs - } + }.seq } /** Checks if we should filter out this path name. */