You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by li...@apache.org on 2014/04/24 20:18:41 UTC
svn commit: r1589821 -
/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/TableServers.java
Author: liyin
Date: Thu Apr 24 18:18:40 2014
New Revision: 1589821
URL: http://svn.apache.org/r1589821
Log:
[HBASE-9704] Do not retry on Hadoop port on exceptions while creating a thrift client
Author: manukranthk
Summary: We added this functionality such that we will be able to connect to regionservers while in a rolling restart state. Since this assumption does not hold anymore. We should remove this retry and simply throw in case of a failure.
Test Plan: Not a major change. Removing a retry which doesn't work currently
Reviewers: aaiyer, gauravm, adela
Reviewed By: gauravm
CC: hbase-eng@
Differential Revision: https://phabricator.fb.com/D1290661
Modified:
hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/TableServers.java
Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/TableServers.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/TableServers.java?rev=1589821&r1=1589820&r2=1589821&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/TableServers.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/TableServers.java Thu Apr 24 18:18:40 2014
@@ -1163,51 +1163,26 @@ private HRegionLocation locateMetaInRoot
// attempts
if (this.useThrift) {
Class<? extends ThriftClientInterface> serverInterface =
- ThriftHRegionInterface.class;
+ ThriftHRegionInterface.class;
if (thriftPortWrittenToMeta) {
- try {
- server = (HRegionInterface) HBaseThriftRPC.getClient(
+ server = (HRegionInterface) HBaseThriftRPC.getClient(
regionServer.getInetSocketAddress(), this.conf,
serverInterface, options);
- } catch (Exception e) {
- LOG.warn("Exception connecting to the region server on" +
- "the thrift channel. Retrying on the HadoopRPC port", e);
- InetSocketAddress addr = new InetSocketAddress(regionServer
- .getInetSocketAddress().getHostName(), conf.getInt(
- HConstants.REGIONSERVER_PORT,
- HConstants.DEFAULT_REGIONSERVER_PORT));
- server = (HRegionInterface) HBaseRPC.getProxy(serverInterfaceClass,
- HBaseRPCProtocolVersion.versionID, addr, this.conf,
- params.getRpcTimeout(), options);
- }
} else {
- try {
- InetSocketAddress addr = new InetSocketAddress(regionServer
+ InetSocketAddress addr = new InetSocketAddress(regionServer
.getInetSocketAddress().getHostName(), conf.getInt(
- HConstants.REGIONSERVER_SWIFT_PORT,
- HConstants.DEFAULT_REGIONSERVER_SWIFT_PORT));
- server = (HRegionInterface) HBaseThriftRPC.getClient(addr,
+ HConstants.REGIONSERVER_SWIFT_PORT,
+ HConstants.DEFAULT_REGIONSERVER_SWIFT_PORT));
+ server = (HRegionInterface) HBaseThriftRPC.getClient(addr,
this.conf, serverInterface, options);
- } catch (Exception e) {
- LOG.warn("Exception connecting to the region server on" +
- "the thrift channel. Retrying on the HadoopRPC port", e);
- server = (HRegionInterface) HBaseRPC.getProxy(serverInterfaceClass,
- HBaseRPCProtocolVersion.versionID,
- regionServer.getInetSocketAddress(), this.conf,
- params.getRpcTimeout(), options);
- }
}
} else {
if (hadoopPortWrittenToMeta) {
server = (HRegionInterface) HBaseRPC.getProxy(serverInterfaceClass,
- HBaseRPCProtocolVersion.versionID,
- regionServer.getInetSocketAddress(), this.conf,
+ HBaseRPCProtocolVersion.versionID,
+ regionServer.getInetSocketAddress(), this.conf,
params.getRpcTimeout(), options);
} else {
- // The hadoop port is no longer written to Meta (this will happen
- // when we are reasonably confident about the thrift service, and
- // will soon deprecate RPC). So, try to connect to the default port.
- // TODO gauravm: Verify that this works (t2830553)
InetSocketAddress addr = new InetSocketAddress(regionServer
.getInetSocketAddress().getHostName(), conf.getInt(
HConstants.REGIONSERVER_PORT,