-
Notifications
You must be signed in to change notification settings - Fork 408
[CELEBORN-1359] Support Netty Logging at the network layer #2423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
cc @mridulm, @otterc, @FMX, @RexXiong, @waitinfuture. |
bff759c to
20d5a04
Compare
|
Code change LGTM, please update the PR description, we are using LOG4J2 with
|
|
@pan3793, I have updated the description of this pull request. PTAL. |
mridulm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this !
This was in my list here CELEBORN-1350 :-)
otterc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just have a small question
common/src/main/java/org/apache/celeborn/common/network/TransportContext.java
Show resolved
Hide resolved
common/src/main/java/org/apache/celeborn/common/network/util/NettyLogger.java
Show resolved
Hide resolved
RexXiong
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks! Merge to main(v0.5.0)
### What changes were proposed in this pull request? Support Netty level logging at the network layer for Celeborn. To configure Netty level logging a LogHandler must be added to the channel pipeline. `NettyLogger` is introduced as a new class which is able to construct a log handler depending on the log level: - In case of `<Logger name="org.apache.celeborn.common.network.util.NettyLogger" level="DEBUG" additivity="false">`: a custom log handler is created which does not dump the message contents. This way the log is a bit more compact. Moreover when network level encryption is switched on this level might be sufficient. - In case of `<Logger name="org.apache.celeborn.common.network.util.NettyLogger" level="TRACE" additivity="false">`: Netty's own log handler is used which dumps the message contents. - Otherwise (when the logger is not `TRACE` or `DEBUG`) the pipeline does not contain a log handler (there is no runtime penalty for the default setting but a long running service must be restarted along with the new log level to have an effect). Backport: - [[SPARK-36719][CORE] Supporting Netty Logging at the network layer](apache/spark#33962) - [[SPARK-45377][CORE] Handle InputStream in NettyLogger](apache/spark#43165) ### Why are the changes needed? This level of logging proved to be sufficient during debugging some external shuffle related problem. Compared with the tcpdump this log lines can be more easily correlated with the Celeborn internal calls. Moreover the log layout can be configured to contain the thread names that way for a timeout a busy thread could be identified. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Local manually test. Closes apache#2423 from SteNicholas/CELEBORN-1359. Authored-by: SteNicholas <[email protected]> Signed-off-by: Shuang <[email protected]>
What changes were proposed in this pull request?
Support Netty level logging at the network layer for Celeborn. To configure Netty level logging a LogHandler must be added to the channel pipeline.
NettyLoggeris introduced as a new class which is able to construct a log handler depending on the log level:<Logger name="org.apache.celeborn.common.network.util.NettyLogger" level="DEBUG" additivity="false">: a custom log handler is created which does not dump the message contents. This way the log is a bit more compact. Moreover when network level encryption is switched on this level might be sufficient.<Logger name="org.apache.celeborn.common.network.util.NettyLogger" level="TRACE" additivity="false">: Netty's own log handler is used which dumps the message contents.TRACEorDEBUG) the pipeline does not contain a log handler (there is no runtime penalty for the default setting but a long running service must be restarted along with the new log level to have an effect).Backport:
Why are the changes needed?
This level of logging proved to be sufficient during debugging some external shuffle related problem. Compared with the tcpdump this log lines can be more easily correlated with the Celeborn internal calls. Moreover the log layout can be configured to contain the thread names that way for a timeout a busy thread could be identified.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Local manually test.