From e52f8d223d59a69ca82dd4d04ef1adfe892a879b Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Tue, 21 Nov 2017 20:16:55 -0800 Subject: [PATCH] HBASE-19323 Make netty engine default in hbase2 --- .../src/main/java/org/apache/hadoop/hbase/ipc/RpcServerFactory.java | 2 +- .../src/test/java/org/apache/hadoop/hbase/ipc/AbstractTestIPC.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServerFactory.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServerFactory.java index 89d660167b..649f1f19a3 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServerFactory.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServerFactory.java @@ -48,7 +48,7 @@ public class RpcServerFactory { final InetSocketAddress bindAddress, Configuration conf, RpcScheduler scheduler) throws IOException { String rpcServerClass = conf.get(CUSTOM_RPC_SERVER_IMPL_CONF_KEY, - SimpleRpcServer.class.getName()); + NettyRpcServer.class.getName()); StringBuffer servicesList = new StringBuffer(); for (BlockingServiceAndInterface s: services) { ServiceDescriptor sd = s.getBlockingService().getDescriptorForType(); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/AbstractTestIPC.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/AbstractTestIPC.java index 4a4272f74e..a8b49a2f8b 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/AbstractTestIPC.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/AbstractTestIPC.java @@ -60,6 +60,7 @@ import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.io.compress.GzipCodec; import org.apache.hadoop.util.StringUtils; +import org.junit.BeforeClass; import org.junit.Test; import org.apache.hadoop.hbase.shaded.com.google.common.collect.ImmutableList; @@ -77,6 +78,10 @@ public abstract class AbstractTestIPC { static byte[] BIG_CELL_BYTES = new byte[10 * 1024]; static KeyValue BIG_CELL = new KeyValue(CELL_BYTES, CELL_BYTES, CELL_BYTES, BIG_CELL_BYTES); static final Configuration CONF = HBaseConfiguration.create(); + static { + // Set the default to be the old SimpleRpcServer. Subclasses test it and netty. + CONF.set(RpcServerFactory.CUSTOM_RPC_SERVER_IMPL_CONF_KEY, SimpleRpcServer.class.getName()); + } protected abstract AbstractRpcClient createRpcClientNoCodec(Configuration conf); -- 2.11.0 (Apple Git-81)