Skip to content

Commit

Permalink
ODP-2646: TEZ-4455: Add LoggingHandler in ShuffleHandler pipeline for…
Browse files Browse the repository at this point in the history
… better debuggability. (apache#249) (Dmitriy Fingerman reviewed by Laszlo Bodor) (#21)

(cherry picked from commit 65f9ee3)
(cherry picked from commit 2c2be57)
(cherry picked from commit 12be783)

Co-authored-by: Dmitriy Fingerman <[email protected]>
  • Loading branch information
prabhjyotsingh and difin authored Nov 20, 2024
1 parent 462ab84 commit 0f02614
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import static io.netty.handler.codec.http.HttpResponseStatus.OK;
import static io.netty.handler.codec.http.HttpResponseStatus.UNAUTHORIZED;
import static io.netty.handler.codec.http.HttpVersion.HTTP_1_1;
import io.netty.handler.logging.LogLevel;
import io.netty.handler.logging.LoggingHandler;

import java.io.File;
import java.io.FileNotFoundException;
Expand Down Expand Up @@ -598,6 +600,9 @@ public void initChannel(NioSocketChannel ch) throws Exception {
if (sslFactory != null) {
pipeline.addLast("ssl", new SslHandler(sslFactory.createSSLEngine()));
}
if (LOG.isDebugEnabled()) {
pipeline.addLast("loggingHandler", new LoggingHandler(LogLevel.DEBUG));
}
pipeline.addLast("decoder", new HttpRequestDecoder());
pipeline.addLast("aggregator", new HttpObjectAggregator(1 << 16));
pipeline.addLast("encoder", new HttpResponseEncoder());
Expand Down

0 comments on commit 0f02614

Please sign in to comment.