Skip to content

Commit b820188

Browse files
committed
HBASE-27278 Improve TestTlsIPC to reuse existing IPC test code (#4682)
Signed-off-by: Bryan Beaudreault <bbeaudreault@apache.org> (cherry picked from commit 3309108)
1 parent 3f5076d commit b820188

File tree

17 files changed

+692
-508
lines changed

17 files changed

+692
-508
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
@@ -73,7 +73,7 @@ public NettyRpcClient(Configuration configuration, String clusterId, SocketAddre
7373
}
7474

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

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
@@ -282,7 +282,7 @@ private void connect() throws UnknownHostException {
282282
.option(ChannelOption.TCP_NODELAY, rpcClient.isTcpNoDelay())
283283
.option(ChannelOption.SO_KEEPALIVE, rpcClient.tcpKeepAlive)
284284
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, rpcClient.connectTO)
285-
.handler(new ChannelInitializer() {
285+
.handler(new ChannelInitializer<Channel>() {
286286
@Override
287287
protected void initChannel(Channel ch) throws Exception {
288288
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)