HBASE-19359 Revisit the default config of hbase client retries number
This commit is contained in:
parent
f81ac42aa3
commit
abb535eef6
|
@ -2628,4 +2628,4 @@ public interface Admin extends Abortable, Closeable {
|
|||
* @return List of servers that are not cleared
|
||||
*/
|
||||
List<ServerName> clearDeadServers(final List<ServerName> servers) throws IOException;
|
||||
}
|
||||
}
|
|
@ -116,7 +116,8 @@ public final class ConnectionUtils {
|
|||
HConstants.DEFAULT_HBASE_CLIENT_RETRIES_NUMBER);
|
||||
// Go big. Multiply by 10. If we can't get to meta after this many retries
|
||||
// then something seriously wrong.
|
||||
int serversideMultiplier = c.getInt("hbase.client.serverside.retries.multiplier", 10);
|
||||
int serversideMultiplier = c.getInt(HConstants.HBASE_CLIENT_SERVERSIDE_RETRIES_MULTIPLIER,
|
||||
HConstants.DEFAULT_HBASE_CLIENT_SERVERSIDE_RETRIES_MULTIPLIER);
|
||||
int retries = hcRetries * serversideMultiplier;
|
||||
c.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, retries);
|
||||
log.info(sn + " server-side Connection retries=" + retries);
|
||||
|
|
|
@ -774,7 +774,12 @@ public final class HConstants {
|
|||
/**
|
||||
* Default value of {@link #HBASE_CLIENT_RETRIES_NUMBER}.
|
||||
*/
|
||||
public static final int DEFAULT_HBASE_CLIENT_RETRIES_NUMBER = 35;
|
||||
public static final int DEFAULT_HBASE_CLIENT_RETRIES_NUMBER = 10;
|
||||
|
||||
public static final String HBASE_CLIENT_SERVERSIDE_RETRIES_MULTIPLIER =
|
||||
"hbase.client.serverside.retries.multiplier";
|
||||
|
||||
public static final int DEFAULT_HBASE_CLIENT_SERVERSIDE_RETRIES_MULTIPLIER = 3;
|
||||
|
||||
/**
|
||||
* Parameter name to set the default scanner caching for all clients.
|
||||
|
|
|
@ -488,7 +488,7 @@ possible configurations would overwhelm and obscure the important.
|
|||
</property>
|
||||
<property>
|
||||
<name>hbase.client.retries.number</name>
|
||||
<value>35</value>
|
||||
<value>10</value>
|
||||
<description>Maximum retries. Used as maximum for all retryable
|
||||
operations such as the getting of a cell's value, starting a row update,
|
||||
etc. Retry interval is a rough function based on hbase.client.pause. At
|
||||
|
|
|
@ -3533,4 +3533,4 @@ public class HMaster extends HRegionServer implements MasterServices {
|
|||
public SpaceQuotaSnapshotNotifier getSpaceQuotaSnapshotNotifier() {
|
||||
return this.spaceQuotaSnapshotNotifier;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1957,7 +1957,7 @@ public class HRegionServer extends HasThread implements
|
|||
conf.getInt("hbase.log.replay.retries.number", 8)); // 8 retries take about 23 seconds
|
||||
sinkConf.setInt(HConstants.HBASE_RPC_TIMEOUT_KEY,
|
||||
conf.getInt("hbase.log.replay.rpc.timeout", 30000)); // default 30 seconds
|
||||
sinkConf.setInt("hbase.client.serverside.retries.multiplier", 1);
|
||||
sinkConf.setInt(HConstants.HBASE_CLIENT_SERVERSIDE_RETRIES_MULTIPLIER, 1);
|
||||
if (this.csm != null) {
|
||||
// SplitLogWorker needs csm. If none, don't start this.
|
||||
this.splitLogWorker = new SplitLogWorker(this, sinkConf, this,
|
||||
|
|
|
@ -96,7 +96,8 @@ public class RegionReplicaFlushHandler extends EventHandler {
|
|||
int numRetries = conf.getInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER,
|
||||
HConstants.DEFAULT_HBASE_CLIENT_RETRIES_NUMBER);
|
||||
if (numRetries > 10) {
|
||||
int mult = conf.getInt("hbase.client.serverside.retries.multiplier", 10);
|
||||
int mult = conf.getInt(HConstants.HBASE_CLIENT_SERVERSIDE_RETRIES_MULTIPLIER,
|
||||
HConstants.DEFAULT_HBASE_CLIENT_SERVERSIDE_RETRIES_MULTIPLIER);
|
||||
numRetries = numRetries / mult; // reset if HRS has multiplied this already
|
||||
}
|
||||
return numRetries;
|
||||
|
|
|
@ -119,11 +119,12 @@ public class RegionReplicaReplicationEndpoint extends HBaseReplicationEndpoint {
|
|||
int defaultNumRetries = conf.getInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER,
|
||||
HConstants.DEFAULT_HBASE_CLIENT_RETRIES_NUMBER);
|
||||
if (defaultNumRetries > 10) {
|
||||
int mult = conf.getInt("hbase.client.serverside.retries.multiplier", 10);
|
||||
int mult = conf.getInt(HConstants.HBASE_CLIENT_SERVERSIDE_RETRIES_MULTIPLIER,
|
||||
HConstants.DEFAULT_HBASE_CLIENT_SERVERSIDE_RETRIES_MULTIPLIER);
|
||||
defaultNumRetries = defaultNumRetries / mult; // reset if HRS has multiplied this already
|
||||
}
|
||||
|
||||
conf.setInt("hbase.client.serverside.retries.multiplier", 1);
|
||||
conf.setInt(HConstants.HBASE_CLIENT_SERVERSIDE_RETRIES_MULTIPLIER, 1);
|
||||
int numRetries = conf.getInt(CLIENT_RETRIES_NUMBER, defaultNumRetries);
|
||||
conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, numRetries);
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ public class TestRegionReplicaReplicationEndpoint {
|
|||
conf.setInt("replication.stats.thread.period.seconds", 5);
|
||||
conf.setBoolean("hbase.tests.use.shortcircuit.reads", false);
|
||||
conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 5); // less number of retries is needed
|
||||
conf.setInt("hbase.client.serverside.retries.multiplier", 1);
|
||||
conf.setInt(HConstants.HBASE_CLIENT_SERVERSIDE_RETRIES_MULTIPLIER, 1);
|
||||
|
||||
HTU.startMiniCluster(NB_SERVERS);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue