Skip to content

Commit

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

(cherry picked from commit 65f9ee3)
(cherry picked from commit 2c2be57)
  • Loading branch information
difin authored and prabhjyotsingh committed Nov 12, 2024
1 parent ef6607b commit c5fdce5
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 c5fdce5

Please sign in to comment.