Skip to content

Commit e9d35d9

Browse files
committed
HBASE-27278 Improve TestTlsIPC to reuse existing IPC test code
1 parent 4ebf719 commit e9d35d9

File tree

18 files changed

+687
-509
lines changed

18 files changed

+687
-509
lines changed

hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ public static String getDefaultCodec(final Configuration c) {
230230
* Encapsulate the ugly casting and RuntimeException conversion in private method.
231231
* @return Codec to use on this client.
232232
*/
233-
Codec getCodec() {
233+
protected Codec getCodec() {
234234
// For NO CODEC, "hbase.client.rpc.codec" must be configured with empty string AND
235235
// "hbase.client.default.rpc.codec" also -- because default is to do cell block encoding.
236236
String className = conf.get(HConstants.RPC_CODEC_CONF_KEY, getDefaultCodec(this.conf));
@@ -251,7 +251,7 @@ public boolean hasCellBlockSupport() {
251251
}
252252

253253
// for writing tests that want to throw exception when connecting.
254-
boolean isTcpNoDelay() {
254+
protected boolean isTcpNoDelay() {
255255
return tcpNoDelay;
256256
}
257257

hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public NettyRpcClient(Configuration configuration, String clusterId, SocketAddre
7272
}
7373

7474
/** Used in test only. */
75-
NettyRpcClient(Configuration configuration) {
75+
public NettyRpcClient(Configuration configuration) {
7676
this(configuration, HConstants.CLUSTER_ID_DEFAULT, null, null);
7777
}
7878

hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcConnection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ private void connect() throws UnknownHostException {
281281
.option(ChannelOption.TCP_NODELAY, rpcClient.isTcpNoDelay())
282282
.option(ChannelOption.SO_KEEPALIVE, rpcClient.tcpKeepAlive)
283283
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, rpcClient.connectTO)
284-
.handler(new ChannelInitializer() {
284+
.handler(new ChannelInitializer<Channel>() {
285285
@Override
286286
protected void initChannel(Channel ch) throws Exception {
287287
if (conf.getBoolean(X509Util.HBASE_CLIENT_NETTY_TLS_ENABLED, false)) {

hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/tls/BaseX509ParameterizedTestCase.java

Lines changed: 0 additions & 104 deletions
This file was deleted.

0 commit comments

Comments
 (0)