You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Cheng Lian (JIRA)" <ji...@apache.org> on 2015/06/05 12:40:00 UTC

[jira] [Comment Edited] (SPARK-8122) ParquetRelation.enableLogForwarding() may fail to configure loggers

    [ https://issues.apache.org/jira/browse/SPARK-8122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14574287#comment-14574287 ] 

Cheng Lian edited comment on SPARK-8122 at 6/5/15 10:39 AM:
------------------------------------------------------------

Just saw this JIRA ticket after opening [PR #6670|https://github.com/apache/spark/pull/6670].

I'm not super familiar with java.util.logging facilities, but [as commented in {{enableLogForwarding()}}|https://github.com/apache/spark/blob/da20c8ca37663738112b04657057858ee3e55072/sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetRelation.scala#L97-L109], and according to [code of Parquet {{Log}} class|https://github.com/apache/parquet-mr/blob/apache-parquet-1.7.0/parquet-common/src/main/java/org/apache/parquet/Log.java#L58], a logger is already created in the static initialization block for package {{org.apache.parquet}}. In {{enableLogForwarding()}}, we are just retrieving a reference to an existing logger instead of creating a new logger instance. The same thing should also apply to the logger retrieved for {{ParquetOutputCommitter}} below.


was (Author: lian cheng):
Just saw this JIRA ticket after opening [PR #6670|https://github.com/apache/spark/pull/6670].

I'm not super familiar with java.util.logging facilities, but [as commented in {{enableLogForwarding()}}|https://github.com/liancheng/spark/blob/spark-8118/sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetRelation.scala], and according to [code of Parquet {{Log}} class|https://github.com/apache/parquet-mr/blob/apache-parquet-1.7.0/parquet-common/src/main/java/org/apache/parquet/Log.java#L58], a logger is already created in the static initialization block for package {{org.apache.parquet}}. In {{enableLogForwarding()}}, we are just retrieving a reference to an existing logger instead of creating a new logger instance. The same thing should also apply to the logger retrieved for {{ParquetOutputCommitter}} below.

> ParquetRelation.enableLogForwarding() may fail to configure loggers
> -------------------------------------------------------------------
>
>                 Key: SPARK-8122
>                 URL: https://issues.apache.org/jira/browse/SPARK-8122
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 1.5.0
>            Reporter: Konstantin Shaposhnikov
>            Priority: Minor
>
> _enableLogForwarding()_ doesn't hold to the created loggers that can be garbage collected and all configuration changes will be gone. From https://docs.oracle.com/javase/6/docs/api/java/util/logging/Logger.html javadocs:  _It is important to note that the Logger returned by one of the getLogger factory methods may be garbage collected at any time if a strong reference to the Logger is not kept._
> All created logger references need to be kept, e.g. in static variables.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org