@InterfaceAudience.Private public final class ConnectionUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
HBASE_CLIENT_CONNECTION_IMPL
Key for configuration in Configuration whose value is the class we implement making a new
Connection instance.
|
static long |
SLEEP_DELTA_NS |
Modifier and Type | Method and Description |
---|---|
static org.apache.hadoop.hbase.client.ScanResultCache |
createScanResultCache(Scan scan) |
static long |
getPauseTime(long pause,
int tries)
Calculate pause time.
|
static void |
setServerSideHConnectionRetriesConfig(org.apache.hadoop.conf.Configuration c,
String sn,
org.slf4j.Logger log)
Changes the configuration to set the number of retries needed when using Connection internally,
e.g.
|
public static final String HBASE_CLIENT_CONNECTION_IMPL
public static final long SLEEP_DELTA_NS
public static long getPauseTime(long pause, int tries)
HConstants.RETRY_BACKOFF
.pause
- time to pausetries
- amount of triestries
retriespublic static void setServerSideHConnectionRetriesConfig(org.apache.hadoop.conf.Configuration c, String sn, org.slf4j.Logger log)
c
- The Configuration instance to set the retries into.log
- Used to log what we set in here.public static org.apache.hadoop.hbase.client.ScanResultCache createScanResultCache(Scan scan)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.