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 @@ -84,6 +84,21 @@ private[sql] case class ParquetRelation(
private[sql] object ParquetRelation {

def enableLogForwarding() {
// Note: the parquet.Log class has a static initializer that
// sets the java.util.logging Logger for "parquet". This
// checks first to see if there's any handlers already set
// and if not it creates them. If this method executes prior
// to that class being loaded then:
// 1) there's no handlers installed so there's none to
// remove. But when it IS finally loaded the desired affect
// of removing them is circumvented.
// 2) The parquet.Log static initializer calls setUseParentHanders(false)
// undoing the attempt to override the logging here.
//
// Therefore we need to force the class to be loaded.
// This should really be resolved by Parquet.
Copy link
Contributor

Choose a reason for hiding this comment

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

Bonus points if you can file a JIRA with them and follow up on this :) They are generally pretty open/responsive.

Copy link
Author

Choose a reason for hiding this comment

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

Okay. I posted a suggestion to their dev-list. We'll see where it goes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great, thanks!

Class.forName(classOf[parquet.Log].getName())

// Note: Logger.getLogger("parquet") has a default logger
// that appends to Console which needs to be cleared.
val parquetLogger = java.util.logging.Logger.getLogger("parquet")
Expand Down