Uh oh!
There was an error while loading. Please reload this page.
[SPARK-14754][SPARK CORE] Metrics as logs are not coming through slf4j - #12697
[SPARK-14754][SPARK CORE] Metrics as logs are not coming through slf4j#12697mihir6692 wants to merge 4 commits into
Conversation
AmplabJenkins
commented
Apr 26, 2016
Can one of the admins verify this patch? |
| MetricsSystem.checkMinimalPollingPeriod(pollUnit, pollPeriod) | ||
| val reporter: Slf4jReporter = Slf4jReporter.forRegistry(registry) | ||
| .outputTo(LoggerFactory.getLogger("org.apache.spark.metrics")) |
There was a problem hiding this comment.
Why not the class name for the logger name here, per your JIRA?
Updated import style as per conventions
Update class name for logger
mihir6692
commented
Apr 26, 2016
I have added 2 more commits and updated the pull request. Please have a look. |
| MetricsSystem.checkMinimalPollingPeriod(pollUnit, pollPeriod) | ||
| val reporter: Slf4jReporter = Slf4jReporter.forRegistry(registry) | ||
| .outputTo(LoggerFactory.getLogger("org.apache.spark.metrics.sink.Slf4jSink")) |
There was a problem hiding this comment.
Sure, it can be classOf[Slf4jSink].getName for simplicity and to avoid forgetting to update it if for some reason this moves.
There was a problem hiding this comment.
For Slf4jSink.scala :-
Its not about class path or class level in package. It is just a name. Ex.
If you keep name like Spark.log4j, it would still work. ( and use the
same Spark.log4j in log4j.properties). So it won't matter even if we
move class to some other folder or package.
EDIT :-
I understood what you are trying to say. I will update it with new commit. Thanks for guidance.
HyukjinKwon
commented
Oct 12, 2016
gentle ping @mihir6692 |
1 similar comment
HyukjinKwon
commented
Feb 9, 2017
gentle ping @mihir6692 |
## What changes were proposed in this pull request? This PR proposes to close stale PRs. What I mean by "stale" here includes that there are some review comments by reviewers but the author looks inactive without any answer to them more than a month. I left some comments roughly a week ago to ping and the author looks still inactive in these PR below These below includes some PR suggested to be closed and a PR against another branch which seems obviously inappropriate. Given the comments in the last three PRs below, they are probably worth being taken over by anyone who is interested in it. Closesapache#7963Closesapache#8374Closesapache#11192Closesapache#11374Closesapache#11692Closesapache#12243Closesapache#12583Closesapache#12620Closesapache#12675Closesapache#12697Closesapache#12800Closesapache#13715Closesapache#14266Closesapache#15053Closesapache#15159Closesapache#15209Closesapache#15264Closesapache#15267Closesapache#15871Closesapache#15861Closesapache#16319Closesapache#16324Closesapache#16890Closesapache#12398Closesapache#12933Closesapache#14517 ## How was this patch tested? N/A Author: hyukjinkwon <gurwls223@gmail.com> Closesapache#16937 from HyukjinKwon/stale-prs-close.
What changes were proposed in this pull request?
Two changes need to be done :
Slf4jsink.scala
Added class name for logging. (Reference : https://dropwizard.github.io/metrics/3.1.0/manual/core/#man-core-reporters-slf4j )
log4j.properties.template
Added log configuration in log4j.properties.template for in support of above changes.
How was this patch tested?
It is tested with manual testing. I build spark with make-distribution.sh and then tried few example job to print Metrics in log files.