Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -376,14 +376,10 @@ class HDFSFileCatalog(
HadoopFsRelation.shouldFilterOut(name)
}

val (dirs, files) = statuses.partition(_.isDirectory)
val (_, files) = statuses.partition(_.isDirectory)

// It uses [[LinkedHashSet]] since the order of files can affect the results. (SPARK-11500)
if (dirs.isEmpty) {
mutable.LinkedHashSet(files: _*)
} else {
mutable.LinkedHashSet(files: _*) ++ listLeafFiles(dirs.map(_.getPath))
}
mutable.LinkedHashSet(files: _*)
Copy link
Member

@HyukjinKwon HyukjinKwon Apr 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure of the difference between 1.6.1 and master? I see this logics are not changed comparing to that interfaces.scala#L467-L472 in branch 1.6.
Also, does this still support to read partitioned tables?

Copy link
Member

@HyukjinKwon HyukjinKwon Apr 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I believe there is another method in HadoopFsRelation companion object to list up files parallely. This will use this method based on a threshold. I think that should be also corrected if it is really problematic and there should be tests for them as well.

}
}

Expand Down