Skip to content

Commit 7f4a3b5

Browse files
Apache9anmolnar
authored andcommitted
CDPD-43982: Improve TestTlsIPC to reuse existing IPC test code (apache#4682)
Change[2/4] for: Backporting the changes related to HBASE-27278 (related to TLS). Signed-off-by: Bryan Beaudreault <bbeaudreault@apache.org> (cherry picked from commit 3309108) Change-Id: I97c6713059a6e41a56fc0a2614800d251f6349c5
1 parent 8372f8e commit 7f4a3b5

17 files changed

Lines changed: 680 additions & 505 deletions

File tree

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
@@ -226,7 +226,7 @@ public static String getDefaultCodec(final Configuration c) {
226226
* Encapsulate the ugly casting and RuntimeException conversion in private method.
227227
* @return Codec to use on this client.
228228
*/
229-
Codec getCodec() {
229+
protected Codec getCodec() {
230230
// For NO CODEC, "hbase.client.rpc.codec" must be configured with empty string AND
231231
// "hbase.client.default.rpc.codec" also -- because default is to do cell block encoding.
232232
String className = conf.get(HConstants.RPC_CODEC_CONF_KEY, getDefaultCodec(this.conf));
@@ -246,7 +246,7 @@ public boolean hasCellBlockSupport() {
246246
}
247247

248248
// for writing tests that want to throw exception when connecting.
249-
boolean isTcpNoDelay() {
249+
protected boolean isTcpNoDelay() {
250250
return tcpNoDelay;
251251
}
252252

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
@@ -277,7 +277,7 @@ private void connect() {
277277
.option(ChannelOption.TCP_NODELAY, rpcClient.isTcpNoDelay())
278278
.option(ChannelOption.SO_KEEPALIVE, rpcClient.tcpKeepAlive)
279279
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, rpcClient.connectTO)
280-
.handler(new ChannelInitializer() {
280+
.handler(new ChannelInitializer<Channel>() {
281281
@Override
282282
protected void initChannel(Channel ch) throws Exception {
283283
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)