Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Jun 27, 2016

What changes were proposed in this pull request?

SPARK-8118 implements redirecting Parquet JUL logger via SLF4J, but it is currently applied only when READ operations occurs. If users use only WRITE operations, there occurs many Parquet logs.

This PR makes the redirection work on WRITE operations, too.

Before

scala> spark.range(10).write.format("parquet").mode("overwrite").save("/tmp/p")
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Jun 26, 2016 9:04:38 PM INFO: org.apache.parquet.hadoop.codec.CodecConfig: Compression: SNAPPY
............ about 70 lines Parquet Log .............
scala> spark.range(10).write.format("parquet").mode("overwrite").save("/tmp/p")
............ about 70 lines Parquet Log .............

After

scala> spark.range(10).write.format("parquet").mode("overwrite").save("/tmp/p")
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.                                                                                
scala> spark.range(10).write.format("parquet").mode("overwrite").save("/tmp/p")

This PR also fixes some typos.

How was this patch tested?

Manual.

…erations

Remove a legacy try-catch block and fix some typos. (Bug)
@SparkQA
Copy link

SparkQA commented Jun 27, 2016

Test build #61287 has finished for PR 13918 at commit a643114.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 27, 2016

Test build #61290 has finished for PR 13918 at commit badf828.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun
Copy link
Member Author

Hi, @liancheng .
Could you review this PR?

conf.setBoolean(ParquetOutputFormat.ENABLE_JOB_SUMMARY, false)
}

ParquetFileFormat.redirectParquetLogs
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add () since this method is defined with () and is invoked for side effect only.

@liancheng
Copy link
Contributor

LGTM except for one minor comment. Thanks for fixing this annoying issue!

@dongjoon-hyun
Copy link
Member Author

dongjoon-hyun commented Jun 27, 2016

Thank you, @liancheng ! I fixed it.
By the way, you already finished all before. :)
I think some updates on ParquetWriter seemed to modify after that.

@SparkQA
Copy link

SparkQA commented Jun 27, 2016

Test build #61306 has finished for PR 13918 at commit fd84576.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun
Copy link
Member Author

Hi, @liancheng .
Now, it passes the Jenkins again.

@asfgit asfgit closed this in a0da854 Jun 28, 2016
@liancheng
Copy link
Contributor

Thanks, merged to master.

@rxin Shall we have this in branch-2.0 at this stage?

@dongjoon-hyun
Copy link
Member Author

Thank you for merging, @liancheng ! :)

@rxin
Copy link
Contributor

rxin commented Jun 28, 2016

Yea it's good to have this in branch-2.0.

@dongjoon-hyun dongjoon-hyun deleted the SPARK-16221 branch July 20, 2016 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants