You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2020/03/04 17:57:54 UTC

[hbase] branch branch-2 updated: Revert "Put into all site.xmls and check system property is set" Pushed by mistake

This is an automated email from the ASF dual-hosted git repository.

stack pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new c5e0a13  Revert "Put into all site.xmls and check system property is set" Pushed by mistake
c5e0a13 is described below

commit c5e0a1397b3c6a14612e4c5b66f995c02de4310b
Author: stack <st...@apache.org>
AuthorDate: Wed Mar 4 09:57:33 2020 -0800

    Revert "Put into all site.xmls and check system property is set"
    Pushed by mistake
    
    This reverts commit c8c2a875056f27c9af81293a504d75634cbc1fa5.
---
 .../hbase/ipc/DefaultNettyEventLoopConfig.java     | 13 +++------
 .../apache/hadoop/hbase/ipc/NettyRpcClient.java    |  7 ++---
 .../hbase/client/example/HttpProxyExample.java     |  1 -
 .../apache/hadoop/hbase/ipc/NettyRpcServer.java    |  4 +--
 .../hbase/util/NettyEventLoopGroupConfig.java      |  3 ++
 hbase-server/src/test/resources/hbase-site.xml     | 32 ----------------------
 pom.xml                                            |  2 --
 7 files changed, 10 insertions(+), 52 deletions(-)

diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/DefaultNettyEventLoopConfig.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/DefaultNettyEventLoopConfig.java
index 416e0ca..87e5540 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/DefaultNettyEventLoopConfig.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/DefaultNettyEventLoopConfig.java
@@ -22,6 +22,7 @@ import org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup;
 import org.apache.hbase.thirdparty.io.netty.channel.nio.NioEventLoopGroup;
 import org.apache.hbase.thirdparty.io.netty.channel.socket.nio.NioSocketChannel;
 import org.apache.hbase.thirdparty.io.netty.util.concurrent.DefaultThreadFactory;
+
 import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.hadoop.hbase.util.Pair;
 
@@ -30,16 +31,10 @@ import org.apache.hadoop.hbase.util.Pair;
  */
 @InterfaceAudience.Private
 class DefaultNettyEventLoopConfig {
-  /**
-   * Name of system property to set to change default netty eventloop pool size.
-   * Default is 0.
-   */
-  public static final String HBASE_NETTY_EVENTLOOP_DEFAULT_POOL_KEY =
-    "hbase.netty.eventloop.default.pool";
 
   public static final Pair<EventLoopGroup, Class<? extends Channel>> GROUP_AND_CHANNEL_CLASS = Pair
       .<EventLoopGroup, Class<? extends Channel>> newPair(
-        new NioEventLoopGroup(Integer.getInteger(HBASE_NETTY_EVENTLOOP_DEFAULT_POOL_KEY, 0),
-            new DefaultThreadFactory("Default-IPC-NioEventLoopGroup", true,
-              Thread.NORM_PRIORITY)), NioSocketChannel.class);
+        new NioEventLoopGroup(0,
+            new DefaultThreadFactory("Default-IPC-NioEventLoopGroup", true, Thread.MAX_PRIORITY)),
+        NioSocketChannel.class);
 }
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcClient.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcClient.java
index c4c614e..c4f70b0 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcClient.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcClient.java
@@ -58,11 +58,8 @@ public class NettyRpcClient extends AbstractRpcClient<NettyRpcConnection> {
         .getEventLoopConfig(conf);
     if (groupAndChannelClass == null) {
       // Use our own EventLoopGroup.
-      int count =
-        Integer.getInteger(DefaultNettyEventLoopConfig.HBASE_NETTY_EVENTLOOP_DEFAULT_POOL_KEY, 0);
-      System.out.println("COUNT="+ count);
-      this.group = new NioEventLoopGroup(count,
-          new DefaultThreadFactory("IPC-NioEventLoopGroup", true, Thread.NORM_PRIORITY));
+      this.group = new NioEventLoopGroup(0,
+          new DefaultThreadFactory("IPC-NioEventLoopGroup", true, Thread.MAX_PRIORITY));
       this.channelClass = NioSocketChannel.class;
       this.shutdownGroupWhenClose = true;
     } else {
diff --git a/hbase-examples/src/main/java/org/apache/hadoop/hbase/client/example/HttpProxyExample.java b/hbase-examples/src/main/java/org/apache/hadoop/hbase/client/example/HttpProxyExample.java
index 00d01a8..4ada599 100644
--- a/hbase-examples/src/main/java/org/apache/hadoop/hbase/client/example/HttpProxyExample.java
+++ b/hbase-examples/src/main/java/org/apache/hadoop/hbase/client/example/HttpProxyExample.java
@@ -229,7 +229,6 @@ public class HttpProxyExample {
     channelGroup = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);
     serverChannel = new ServerBootstrap().group(bossGroup, workerGroup)
         .channel(NioServerSocketChannel.class).childOption(ChannelOption.TCP_NODELAY, true)
-        .childOption(ChannelOption.SO_REUSEADDR, true)
         .childHandler(new ChannelInitializer<Channel>() {
 
           @Override
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcServer.java
index a3acc8f..bba1bed 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcServer.java
@@ -84,15 +84,13 @@ public class NettyRpcServer extends RpcServer {
       eventLoopGroup = config.group();
       channelClass = config.serverChannelClass();
     } else {
-      eventLoopGroup = new NioEventLoopGroup(
-        Integer.getInteger(DefaultNettyEventLoopConfig.HBASE_NETTY_EVENTLOOP_DEFAULT_POOL_KEY, 0),
+      eventLoopGroup = new NioEventLoopGroup(0,
           new DefaultThreadFactory("NettyRpcServer", true, Thread.MAX_PRIORITY));
       channelClass = NioServerSocketChannel.class;
     }
     ServerBootstrap bootstrap = new ServerBootstrap().group(eventLoopGroup).channel(channelClass)
         .childOption(ChannelOption.TCP_NODELAY, tcpNoDelay)
         .childOption(ChannelOption.SO_KEEPALIVE, tcpKeepAlive)
-        .childOption(ChannelOption.SO_REUSEADDR, true)
         .childHandler(new ChannelInitializer<Channel>() {
 
           @Override
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/NettyEventLoopGroupConfig.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/NettyEventLoopGroupConfig.java
index 3e247f3..3e7b488 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/NettyEventLoopGroupConfig.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/NettyEventLoopGroupConfig.java
@@ -27,7 +27,9 @@ import org.apache.hbase.thirdparty.io.netty.channel.nio.NioEventLoopGroup;
 import org.apache.hbase.thirdparty.io.netty.channel.socket.nio.NioServerSocketChannel;
 import org.apache.hbase.thirdparty.io.netty.channel.socket.nio.NioSocketChannel;
 import org.apache.hbase.thirdparty.io.netty.util.concurrent.DefaultThreadFactory;
+
 import java.util.concurrent.ThreadFactory;
+
 import org.apache.hadoop.conf.Configuration;
 import org.apache.yetus.audience.InterfaceAudience;
 
@@ -36,6 +38,7 @@ import org.apache.yetus.audience.InterfaceAudience;
  */
 @InterfaceAudience.Private
 public class NettyEventLoopGroupConfig {
+
   private final EventLoopGroup group;
 
   private final Class<? extends ServerChannel> serverChannelClass;
diff --git a/hbase-server/src/test/resources/hbase-site.xml b/hbase-server/src/test/resources/hbase-site.xml
index 5ba8b03..64a1964 100644
--- a/hbase-server/src/test/resources/hbase-site.xml
+++ b/hbase-server/src/test/resources/hbase-site.xml
@@ -158,36 +158,4 @@
     <name>hbase.hconnection.threads.keepalivetime</name>
     <value>3</value>
   </property>
-  <property>
-    <name>hbase.netty.worker.count</name>
-    <value>5</value>
-    <description>Default is 0</description>
-  </property>
-  <property>
-    <name>hbase.hconnection.threads.max</name>
-    <value>6</value>
-    <description>Default is 256</description>
-  </property>
-  <property>
-    <name>hbase.htable.threads.max</name>
-    <value>6</value>
-    <description>Default is MAX_INTEGER</description>
-  </property>
-  <property>
-    <name>hbase.region.replica.replication.threads.max</name>
-    <value>10</value>
-    <description>Default is 256</description>
-  </property>
-  <property>
-    <name>dfs.datanode.handler.count</name>
-    <value>3</value>
-    <description>Default is 10</description>
-  </property>
-  <property>
-    <name>hbase.rest.threads.max</name>
-    <value>5</value>
-    <description>Default is 100</description>
-  </property>
-
-
 </configuration>
diff --git a/pom.xml b/pom.xml
index ef84296..8886cc4 100755
--- a/pom.xml
+++ b/pom.xml
@@ -586,8 +586,6 @@
             <redirectTestOutputToFile>${test.output.tofile}</redirectTestOutputToFile>
             <systemPropertyVariables>
               <test.build.classes>${test.build.classes}</test.build.classes>
-              <!--For testing, set this do a low number: 5-->
-              <hbase.netty.eventloop.default.pool>5</hbase.netty.eventloop.default.pool>
             </systemPropertyVariables>
             <excludes>
               <!-- users can add -D option to skip particular test classes