hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nkey...@apache.org
Subject svn commit: r1478664 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ClusterStatusPublisher.java
Date Fri, 03 May 2013 07:41:45 GMT
Author: nkeywal
Date: Fri May  3 07:41:45 2013
New Revision: 1478664

URL: http://svn.apache.org/r1478664
Log:
HBASE-8466  Netty messages in the logs

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ClusterStatusPublisher.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ClusterStatusPublisher.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ClusterStatusPublisher.java?rev=1478664&r1=1478663&r2=1478664&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ClusterStatusPublisher.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ClusterStatusPublisher.java
Fri May  3 07:41:45 2013
@@ -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 exte
       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));



Mime
View raw message