Skip to content

Conversation

@HyukjinKwon
Copy link
Member

What changes were proposed in this pull request?

Looks Avro uses direct getLogger to create a SLF4J logger. Should better use internal.Logging instead.

How was this patch tested?

Exiting tests.

@holdensmagicalunicorn
Copy link

@HyukjinKwon, thanks! I am a bot who has found some folks who might be able to help with the review:@gatorsmile and @cloud-fan

@HyukjinKwon
Copy link
Member Author

cc @gengliangwang

@SparkQA
Copy link

SparkQA commented Jul 30, 2018

Test build #93774 has finished for PR 21914 at commit 10a79ad.

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

private[avro] class AvroFileFormat extends FileFormat with DataSourceRegister {
private val log = LoggerFactory.getLogger(getClass)
private[avro] class AvroFileFormat extends FileFormat
with DataSourceRegister with Logging with Serializable {
Copy link
Member

Choose a reason for hiding this comment

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

Did you make it Serializable specially? If so, what is the reason?

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks it has to be otherwise it throws an exception about serialization. Same thing is done in ParquetFileFormat too to allow to log everywhere.

@cloud-fan
Copy link
Contributor

LGTM, merging to master!

@asfgit asfgit closed this in fca0b85 Jul 30, 2018
robert3005 pushed a commit to palantir/spark that referenced this pull request Jul 31, 2018
## What changes were proposed in this pull request?

Looks Avro uses direct `getLogger` to create a SLF4J logger. Should better use `internal.Logging` instead.

## How was this patch tested?

Exiting tests.

Author: hyukjinkwon <gurwls223@apache.org>

Closes apache#21914 from HyukjinKwon/avro-log.
@HyukjinKwon HyukjinKwon deleted the avro-log branch October 16, 2018 12:45
@leafjungle
Copy link

hii, @HyukjinKwon , friend.
java.lang.NoSuchMethodError: org.apache.spark.internal.Logging.$init$(Lorg/apache/spark/internal/Logging;)V
at org.apache.spark.sql.hive.HiveUtils$.(HiveUtils.scala:53)

which jar should I add ?

@HyukjinKwon
Copy link
Member Author

Please ask that to the mailing list.

otterc pushed a commit to linkedin/spark that referenced this pull request Mar 22, 2023
Looks Avro uses direct `getLogger` to create a SLF4J logger. Should better use `internal.Logging` instead.

Exiting tests.

Author: hyukjinkwon <gurwls223@apache.org>

Closes apache#21914 from HyukjinKwon/avro-log.

(cherry picked from commit fca0b85)
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.

6 participants