org.apache.hadoop.hbase.client
Class ConnectionUtils
java.lang.Object
org.apache.hadoop.hbase.client.ConnectionUtils
@InterfaceAudience.Public
@InterfaceStability.Evolving
public class ConnectionUtils
- extends Object
Utility used by client connections.
|
Method Summary |
static long |
addJitter(long pause,
float jitter)
Adds / subs a 10% jitter to a pause time. |
static long |
getPauseTime(long pause,
int tries)
Calculate pause time. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConnectionUtils
public ConnectionUtils()
getPauseTime
public static long getPauseTime(long pause,
int tries)
- Calculate pause time.
Built on
HConstants.RETRY_BACKOFF.
- Parameters:
pause - tries -
- Returns:
- How long to wait after
tries retries
addJitter
public static long addJitter(long pause,
float jitter)
- Adds / subs a 10% jitter to a pause time. Minimum is 1.
- Parameters:
pause - the expected pause.jitter - the jitter ratio, between 0 and 1, exclusive.
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.