spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mallman <>
Subject [GitHub] spark pull request #15538: [SPARK-17993][SQL] Fix Parquet log output redirec...
Date Mon, 07 Nov 2016 18:31:05 GMT
Github user mallman commented on a diff in the pull request:
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFileFormat.scala
    @@ -55,6 +56,21 @@ class ParquetFileFormat
       with DataSourceRegister
       with Logging
       with Serializable {
    +  // Poor man's "static initializer". Scala doesn't have language support for static
    +  // and it's important that we initialize `ParquetFileFormat.redirectParquetLogsViaSLF4J`
    +  // doing anything with the Parquet libraries. Rather than expect clients to initialize
    +  // `ParquetFileFormat` singleton object at the right time, we put that initialization
in the
    +  // constructor of this class. This method is idempotent, and essentially a no-op after
its first
    +  // call.
    +  ParquetFileFormat.ensureParquetLogRedirection
    +  // Java serialization will not call the default constructor. Make sure we call
    +  // ParquetFileFormat.ensureParquetLogRedirection in deserialization by implementing
this hook
    +  // method.
    +  private def readObject(in: ObjectInputStream): Unit = {
    +    in.defaultReadObject
    +    ParquetFileFormat.ensureParquetLogRedirection
    --- End diff --
    I've tried to keep this code isolated to the parquet implementation.

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message