Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/18073#discussion_r118004547
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFileFormat.scala
---
@@ -479,8 +479,9 @@ object ParquetFileFormat extends Logging {
partFiles: Seq[FileStatus],
ignoreCorruptFiles: Boolean): Seq[Footer] = {
val parFiles = partFiles.par
- parFiles.tasksupport = new ForkJoinTaskSupport(new ForkJoinPool(8))
- parFiles.flatMap { currentFile =>
+ val readParquetTaskSupport = new ForkJoinTaskSupport(new
ForkJoinPool(8))
+ parFiles.tasksupport = readParquetTaskSupport
+ val footers = parFiles.flatMap { currentFile =>
--- End diff --
You could probably put the shutdown in a finally block to avoid adding this
new reference. I think you can rearrange to use the existing one below. It does
help shut it down in case of an error too. Also I think you can hold a
reference just to the ForkJoinPool in order to shut it down rather than a ref
to ForkJoinTaskSupport. No big deal
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]