Skip to content

Commit 45f0c81

Browse files
committed
SPARK-25062: fix review findings
Change-Id: I57c862ca076015f36aaee1da02c7fce80d740890
1 parent 5735dba commit 45f0c81

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,13 @@ object InMemoryFileIndex extends Logging {
315315
// which is very slow on some file system (RawLocalFileSystem, which is launch a
316316
// subprocess and parse the stdout).
317317
try {
318-
val locations = fs.getFileBlockLocations(f, 0, f.getLen).map(
319-
loc => if (loc.getClass == classOf[BlockLocation]) {
318+
val locations = fs.getFileBlockLocations(f, 0, f.getLen).map { loc =>
319+
if (loc.getClass == classOf[BlockLocation]) {
320320
loc
321321
} else {
322322
new BlockLocation(loc.getNames, loc.getHosts, loc.getOffset, loc.getLength)
323-
})
323+
}
324+
}
324325
val lfs = new LocatedFileStatus(f.getLen, f.isDirectory, f.getReplication, f.getBlockSize,
325326
f.getModificationTime, 0, null, null, null, null, f.getPath, locations)
326327
if (f.isSymlink) {

0 commit comments

Comments
 (0)