Github user liancheng commented on a diff in the pull request:
https://github.com/apache/spark/pull/1959#discussion_r16582511
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetTypes.scala ---
@@ -373,9 +373,11 @@ private[parquet] object ParquetTypesConverter extends
Logging {
}
ParquetRelation.enableLogForwarding()
+ // NOTE: Explicitly list "_temporary" because hadoop 0.23 removed the
variable TEMP_DIR_NAME
+ // from FileOutputCommitter. Check MAPREDUCE-5229 for the detail.
val children = fs.listStatus(path).filterNot { status =>
val name = status.getPath.getName
- name(0) == '.' || name == FileOutputCommitter.SUCCEEDED_FILE_NAME
+ name(0) == '.' || name == FileOutputCommitter.SUCCEEDED_FILE_NAME ||
name == "_temporary"
}
// NOTE (lian): Parquet "_metadata" file can be very slow if the file
consists of lots of row
--- End diff --
`listStatus(path)` call can be expensive, especially when the `path` is an
S3 URI. In that case, an HTTP request is issued to get all the `FileStatus`
objects. and it may take hundred of milliseconds to return (depending on how
may HDFS files there are). That's why I `children` is used.
And yea, I also find definition of "Parquet file" somewhat confusing, and
even the official Parquet documentations doesn't provide a precise definition.
IMO a `part-*` file is roughly equivalent to a row group of a Parquet file, but
it also carries its own metadata and is thus self describing.
---
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]