From 6784e894e28d13cfe2d2a53cbca8a2dab53f2578 Mon Sep 17 00:00:00 2001 From: nkeywal Date: Fri, 3 May 2013 07:41:45 +0000 Subject: [PATCH] HBASE-8466 Netty messages in the logs git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1478664 13f79535-47bb-0310-9956-ffa450edef68 --- .../hadoop/hbase/master/ClusterStatusPublisher.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ClusterStatusPublisher.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ClusterStatusPublisher.java index 863456cec02..d6458c10df9 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ClusterStatusPublisher.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ClusterStatusPublisher.java @@ -33,6 +33,9 @@ import org.apache.hadoop.hbase.util.Pair; import org.apache.hadoop.hbase.util.Threads; import org.apache.hadoop.hbase.util.VersionInfo; import org.jboss.netty.bootstrap.ConnectionlessBootstrap; +import org.jboss.netty.channel.ChannelEvent; +import org.jboss.netty.channel.ChannelHandlerContext; +import org.jboss.netty.channel.ChannelUpstreamHandler; import org.jboss.netty.channel.Channels; import org.jboss.netty.channel.socket.DatagramChannel; import org.jboss.netty.channel.socket.DatagramChannelFactory; @@ -246,7 +249,14 @@ public class ClusterStatusPublisher extends Chore { DatagramChannelFactory f = new OioDatagramChannelFactory(service); ConnectionlessBootstrap b = new ConnectionlessBootstrap(f); - b.setPipeline(Channels.pipeline(new ProtobufEncoder())); + b.setPipeline(Channels.pipeline(new ProtobufEncoder(), + new ChannelUpstreamHandler() { + @Override + public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) + throws Exception { + // We're just writing here. Discard any incoming data. See HBASE-8466. + } + })); channel = (DatagramChannel) b.bind(new InetSocketAddress(0));