Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-23205 Correctly update the position of WALs currently being replicated #749

Closed
wants to merge 52 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
6f1f7bc
HBASE-23205 Correctly update the position of WALs currently being rep…
JeongDaeKim Sep 26, 2019
affc75a
fix checkstyle warnings
JeongDaeKim Oct 24, 2019
b6efe7e
Fix typo
JeongDaeKim Oct 24, 2019
114aa1b
(fix) close writer
Oct 30, 2019
4bcc397
HBASE-23229 Update branch-1 to 1.6.0-SNAPSHOT (#772)
busbey Oct 30, 2019
1dbf6f7
(fix) revert test for HBASE-18137
Oct 31, 2019
c0b8f7b
Revert unnecessary codes
Oct 31, 2019
577db5d
HBASE-23238 Additional test and checks for null references on Scanner…
wchevreuil Oct 31, 2019
3c7c1b5
HBASE-23185 Fix high cpu usage because getTable()#put() gets config v…
bitterfox Oct 31, 2019
2451023
HBASE-23219 Re-enable ZKLess tests for branch-1 (Revert HBASE-14622)
Oct 25, 2019
3f9ce86
HBASE-23246 Fix error prone warning in TestMetricsUserSourceImpl (#789)
apurtell Nov 4, 2019
75620b0
(fix) Change newly added method name
Nov 4, 2019
c92d79e
(fix) add getRecoveredQueueInfo() to make a test more recognizable
Nov 5, 2019
d3ed533
(fix) a check style warning
Nov 5, 2019
1360816
HBASE-23250 Log message about CleanerChore delegate initialization sh…
rabi-kumar Nov 5, 2019
a5f09cd
HBASE-23212 Dynamically reload configs for Region Recovery chore (#803)
virajjasani Nov 5, 2019
cf02e6f
HBASE-23236 Upgrade to yetus 0.11.1
Apache9 Nov 6, 2019
72d622b
HBASE-23228 Allow for jdk8 specific modules on branch-1 in precommit/…
busbey Nov 8, 2019
abf6ec0
HBASE-18439 Subclasses of o.a.h.h.chaos.actions.Action all use the sa…
rabi-kumar Nov 8, 2019
9b30df5
HBASE-23273 Fix table header display is incorrect on table.jsp when v…
guangxuCheng Nov 10, 2019
aa2e487
HBASE-23245 : MutableHistogram constructor changes and provide Histog…
virajjasani Nov 11, 2019
caef9f0
HBASE-23245 : Test Histogram Impl changes for histogram update (Adden…
virajjasani Nov 12, 2019
a154bd8
HBASE-23283 Provide clear and consistent logging about the period of …
liuml07 Nov 13, 2019
5130bc5
HBASE-23287 LogCleaner is not added to choreService
ZhaoBQ Nov 13, 2019
b566a4f
HBASE-22701 Disable the DynamicClassLoader when it fails to initialize
joshelser Jul 16, 2019
8e60b0c
HBASE-23261 Region stuck in transition while splitting
virajjasani Nov 11, 2019
0cae004
(fix) log a message even in empty batch case
Nov 18, 2019
5f36343
HBASE-23288 - Backport HBASE-23251 (Add Column Family and Table Names…
gjacoby126 Nov 19, 2019
eee337f
HBASE-23278 Add a table-level compaction progress display on the UI (…
ZhaoBQ Nov 19, 2019
eb5e94a
HBASE-23259: Populate master address end points in cluster/rs configs…
bharathv Nov 21, 2019
38ae0b5
HBASE-23234 Provide .editorconfig based on checkstyle configuration (…
ndimiduk Nov 21, 2019
da9f6bf
HBASE-23237 Prevent Negative values in metrics requestsPerSecond (#866)
Nov 23, 2019
af2ac03
HBASE-23337 Release scripts should rely on maven for deploy. (#887)
busbey Dec 2, 2019
737eaa6
HBASE-23359 RS going down with NPE when splitting a region with compa…
brfrn169 Dec 4, 2019
ec55c2a
HBASE-22096 /storeFile.jsp shows CorruptHFileException when the store…
brfrn169 Dec 4, 2019
9b10afd
HBASE-23364 HRegionServer sometimes does not shut down.
lhofhansl Dec 6, 2019
f5171b4
HBASE-23073 Add an optional costFunction to balance regions according…
PierreZ Dec 9, 2019
80c3581
HBASE-23552 Format Javadocs on ITBLL
ndimiduk Dec 9, 2019
67ca8db
(fix) Add a new test and expose an api
Dec 11, 2019
84c0a90
HBASE-23360 [CLI] Fix help command 'set_quota' for removing limits (#…
Dec 11, 2019
871e2ea
HBASE-23205 Correctly update the position of WALs currently being rep…
JeongDaeKim Sep 26, 2019
2142ded
fix checkstyle warnings
JeongDaeKim Oct 24, 2019
6a574ff
Fix typo
JeongDaeKim Oct 24, 2019
16d56dd
(fix) close writer
Oct 30, 2019
3e83af8
(fix) revert test for HBASE-18137
Oct 31, 2019
bb5492d
Revert unnecessary codes
Oct 31, 2019
b541c24
(fix) Change newly added method name
Nov 4, 2019
833467c
(fix) add getRecoveredQueueInfo() to make a test more recognizable
Nov 5, 2019
5cc0dca
(fix) a check style warning
Nov 5, 2019
9e08eea
(fix) log a message even in empty batch case
Nov 18, 2019
d6297a7
(fix) Add a new test and expose an api
Dec 11, 2019
572c73b
Merge branch 'HBASE-23205' of https://github.com/JeongDaeKim/hbase in…
wchevreuil Dec 13, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
693 changes: 693 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev-support/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pipeline {
disableConcurrentBuilds()
}
environment {
YETUS_RELEASE = '0.11.0'
YETUS_RELEASE = '0.11.1'
// where we'll write everything from different steps. Need a copy here so the final step can check for success/failure.
OUTPUT_DIR_RELATIVE_GENERAL = 'output-general'
OUTPUT_DIR_RELATIVE_JDK7 = 'output-jdk7'
Expand Down
2 changes: 1 addition & 1 deletion dev-support/Jenkinsfile_GitHub
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pipeline {
DOCKERFILE = "${SOURCEDIR}/dev-support/docker/Dockerfile"
YETUS='yetus'
// Branch or tag name. Yetus release tags are 'rel/X.Y.Z'
YETUS_VERSION='rel/0.11.0'
YETUS_VERSION='rel/0.11.1'
}

parameters {
Expand Down
20 changes: 19 additions & 1 deletion dev-support/hbase-personality.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ function personality_modules
local repostatus=$1
local testtype=$2
local extra=""
local branch1jdk8=()
local jdk8module=""
local MODULES=("${CHANGED_MODULES[@]}")

yetus_info "Personality: ${repostatus} ${testtype}"
Expand Down Expand Up @@ -169,6 +171,21 @@ function personality_modules
return
fi

# This list should include any modules that require jdk8. Maven should be configured to only
# include them when a proper JDK is in use, but that doesn' work if we specifically ask for the
# module to build as yetus does if something changes in the module. Rather than try to
# figure out what jdk is in use so we can duplicate the module activation logic, just
# build at the top level if anything changes in one of these modules and let maven sort it out.
branch1jdk8=(hbase-error-prone hbase-tinylfu-blockcache)
if [[ "${PATCH_BRANCH}" = branch-1* ]]; then
for jdk8module in "${branch1jdk8[@]}"; do
if [[ "${MODULES[*]}" =~ ${jdk8module} ]]; then
MODULES=(.)
break
fi
done
fi

if [[ ${testtype} == findbugs ]]; then
# Run findbugs on each module individually to diff pre-patch and post-patch results and
# report new warnings for changed modules only.
Expand All @@ -189,7 +206,8 @@ function personality_modules
return
fi

if [[ ${testtype} == compile ]] && [[ "${SKIP_ERRORPRONE}" != "true" ]]; then
if [[ ${testtype} == compile ]] && [[ "${SKIP_ERRORPRONE}" != "true" ]] &&
[[ "${PATCH_BRANCH}" != branch-1* ]] ; then
extra="${extra} -PerrorProne"
fi

Expand Down
2 changes: 1 addition & 1 deletion hbase-annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<artifactId>hbase</artifactId>
<groupId>org.apache.hbase</groupId>
<version>1.5.1-SNAPSHOT</version>
<version>1.6.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion hbase-archetypes/hbase-archetype-builder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<artifactId>hbase-archetypes</artifactId>
<groupId>org.apache.hbase</groupId>
<version>1.5.1-SNAPSHOT</version>
<version>1.6.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion hbase-archetypes/hbase-client-project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<artifactId>hbase-archetypes</artifactId>
<groupId>org.apache.hbase</groupId>
<version>1.5.1-SNAPSHOT</version>
<version>1.6.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>hbase-client-project</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion hbase-archetypes/hbase-shaded-client-project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<artifactId>hbase-archetypes</artifactId>
<groupId>org.apache.hbase</groupId>
<version>1.5.1-SNAPSHOT</version>
<version>1.6.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>hbase-shaded-client-project</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion hbase-archetypes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<artifactId>hbase</artifactId>
<groupId>org.apache.hbase</groupId>
<version>1.5.1-SNAPSHOT</version>
<version>1.6.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion hbase-assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<artifactId>hbase</artifactId>
<groupId>org.apache.hbase</groupId>
<version>1.5.1-SNAPSHOT</version>
<version>1.6.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>hbase-assembly</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions hbase-checkstyle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-checkstyle</artifactId>
<version>1.5.1-SNAPSHOT</version>
<version>1.6.0-SNAPSHOT</version>
<name>Apache HBase - Checkstyle</name>
<description>Module to hold Checkstyle properties for HBase.</description>

<parent>
<artifactId>hbase</artifactId>
<groupId>org.apache.hbase</groupId>
<version>1.5.1-SNAPSHOT</version>
<version>1.6.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion hbase-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<artifactId>hbase</artifactId>
<groupId>org.apache.hbase</groupId>
<version>1.5.1-SNAPSHOT</version>
<version>1.6.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,35 +323,60 @@ public AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService po

this.id = COUNTER.incrementAndGet();

this.pause = conf.getLong(HConstants.HBASE_CLIENT_PAUSE,
HConstants.DEFAULT_HBASE_CLIENT_PAUSE);
long configuredPauseForCQTBE = conf.getLong(HConstants.HBASE_CLIENT_PAUSE_FOR_CQTBE, pause);
if (configuredPauseForCQTBE < pause) {
LOG.warn("The " + HConstants.HBASE_CLIENT_PAUSE_FOR_CQTBE + " setting: "
+ configuredPauseForCQTBE + " is smaller than " + HConstants.HBASE_CLIENT_PAUSE
+ ", will use " + pause + " instead.");
this.pauseForCQTBE = pause;
} else {
this.pauseForCQTBE = configuredPauseForCQTBE;
}
this.numTries = conf.getInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER,
HConstants.DEFAULT_HBASE_CLIENT_RETRIES_NUMBER);
ConnectionConfiguration connConf =
hc.getConfiguration() == conf
? hc.getConnectionConfiguration()
// Slow: parse conf in ConnectionConfiguration constructor
: new ConnectionConfiguration(conf);
if (connConf == null) {
// Slow: parse conf in ConnectionConfiguration constructor
connConf = new ConnectionConfiguration(conf);
}

this.pause = connConf.getPause();
this.pauseForCQTBE = connConf.getPauseForCQTBE();

this.numTries = connConf.getRetriesNumber();
this.rpcTimeout = rpcTimeout;
this.operationTimeout = conf.getInt(HConstants.HBASE_CLIENT_OPERATION_TIMEOUT,
HConstants.DEFAULT_HBASE_CLIENT_OPERATION_TIMEOUT);
this.primaryCallTimeoutMicroseconds = conf.getInt(PRIMARY_CALL_TIMEOUT_KEY, 10000);

this.maxTotalConcurrentTasks = conf.getInt(HConstants.HBASE_CLIENT_MAX_TOTAL_TASKS,
HConstants.DEFAULT_HBASE_CLIENT_MAX_TOTAL_TASKS);
this.maxConcurrentTasksPerServer = conf.getInt(HConstants.HBASE_CLIENT_MAX_PERSERVER_TASKS,
HConstants.DEFAULT_HBASE_CLIENT_MAX_PERSERVER_TASKS);
this.maxConcurrentTasksPerRegion = conf.getInt(HConstants.HBASE_CLIENT_MAX_PERREGION_TASKS,
HConstants.DEFAULT_HBASE_CLIENT_MAX_PERREGION_TASKS);
this.maxHeapSizePerRequest = conf.getLong(HBASE_CLIENT_MAX_PERREQUEST_HEAPSIZE,
DEFAULT_HBASE_CLIENT_MAX_PERREQUEST_HEAPSIZE);
this.maxHeapSizeSubmit = conf.getLong(HBASE_CLIENT_MAX_SUBMIT_HEAPSIZE, DEFAULT_HBASE_CLIENT_MAX_SUBMIT_HEAPSIZE);
this.operationTimeout = connConf.getOperationTimeout();

// Parse config once and reuse config values of hc's AsyncProcess in AsyncProcess for put
// Can be null when constructing hc's AsyncProcess or it's not reusable
AsyncProcess globalAsyncProcess = hc.getConfiguration() == conf ? hc.getAsyncProcess() : null;

this.primaryCallTimeoutMicroseconds =
globalAsyncProcess == null
? conf.getInt(PRIMARY_CALL_TIMEOUT_KEY, 10000)
: globalAsyncProcess.primaryCallTimeoutMicroseconds;

this.maxTotalConcurrentTasks =
globalAsyncProcess == null
? conf.getInt(HConstants.HBASE_CLIENT_MAX_TOTAL_TASKS,
HConstants.DEFAULT_HBASE_CLIENT_MAX_TOTAL_TASKS)
: globalAsyncProcess.maxTotalConcurrentTasks;
this.maxConcurrentTasksPerServer =
globalAsyncProcess == null
? conf.getInt(HConstants.HBASE_CLIENT_MAX_PERSERVER_TASKS,
HConstants.DEFAULT_HBASE_CLIENT_MAX_PERSERVER_TASKS)
: globalAsyncProcess.maxConcurrentTasksPerServer;
this.maxConcurrentTasksPerRegion =
globalAsyncProcess == null
? conf.getInt(HConstants.HBASE_CLIENT_MAX_PERREGION_TASKS,
HConstants.DEFAULT_HBASE_CLIENT_MAX_PERREGION_TASKS)
: globalAsyncProcess.maxConcurrentTasksPerRegion;
this.maxHeapSizePerRequest =
globalAsyncProcess == null
? conf.getLong(HBASE_CLIENT_MAX_PERREQUEST_HEAPSIZE,
DEFAULT_HBASE_CLIENT_MAX_PERREQUEST_HEAPSIZE)
: globalAsyncProcess.maxHeapSizePerRequest;
this.maxHeapSizeSubmit =
globalAsyncProcess == null
? conf.getLong(HBASE_CLIENT_MAX_SUBMIT_HEAPSIZE, DEFAULT_HBASE_CLIENT_MAX_SUBMIT_HEAPSIZE)
: globalAsyncProcess.maxHeapSizeSubmit;
this.startLogErrorsCnt =
conf.getInt(START_LOG_ERRORS_AFTER_COUNT_KEY, DEFAULT_START_LOG_ERRORS_AFTER_COUNT);
globalAsyncProcess == null
? conf.getInt(START_LOG_ERRORS_AFTER_COUNT_KEY, DEFAULT_START_LOG_ERRORS_AFTER_COUNT)
: globalAsyncProcess.startLogErrorsCnt;

if (this.maxTotalConcurrentTasks <= 0) {
throw new IllegalArgumentException("maxTotalConcurrentTasks=" + maxTotalConcurrentTasks);
Expand Down Expand Up @@ -387,11 +412,16 @@ public AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService po

this.rpcCallerFactory = rpcCaller;
this.rpcFactory = rpcFactory;
this.logBatchErrorDetails = conf.getBoolean(LOG_DETAILS_FOR_BATCH_ERROR, false);
this.logBatchErrorDetails =
globalAsyncProcess == null
? conf.getBoolean(LOG_DETAILS_FOR_BATCH_ERROR, false)
: globalAsyncProcess.logBatchErrorDetails;

this.thresholdToLogUndoneTaskDetails =
conf.getInt(THRESHOLD_TO_LOG_UNDONE_TASK_DETAILS,
DEFAULT_THRESHOLD_TO_LOG_UNDONE_TASK_DETAILS);
globalAsyncProcess == null
? conf.getInt(THRESHOLD_TO_LOG_UNDONE_TASK_DETAILS,
DEFAULT_THRESHOLD_TO_LOG_UNDONE_TASK_DETAILS)
: globalAsyncProcess.thresholdToLogUndoneTaskDetails;
}

public void setRpcTimeout(int rpcTimeout) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HConstants; // Needed for write rpc timeout
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.classification.InterfaceAudience;
import org.apache.hadoop.hbase.classification.InterfaceStability;
Expand Down Expand Up @@ -112,32 +111,32 @@ public class BufferedMutatorImpl implements BufferedMutator {
this.pool = params.getPool();
this.listener = params.getListener();

ConnectionConfiguration tableConf = new ConnectionConfiguration(conf);
ConnectionConfiguration connConf = conn.getConnectionConfiguration();
if (connConf == null) {
// Slow: parse conf in ConnectionConfiguration constructor
connConf = new ConnectionConfiguration(conf);
}
this.writeBufferSize = params.getWriteBufferSize() != BufferedMutatorParams.UNSET ?
params.getWriteBufferSize() : tableConf.getWriteBufferSize();
params.getWriteBufferSize() : connConf.getWriteBufferSize();

// Set via the setter because it does value validation and starts/stops the TimerTask
long newWriteBufferPeriodicFlushTimeoutMs =
params.getWriteBufferPeriodicFlushTimeoutMs() != UNSET
? params.getWriteBufferPeriodicFlushTimeoutMs()
: tableConf.getWriteBufferPeriodicFlushTimeoutMs();
: connConf.getWriteBufferPeriodicFlushTimeoutMs();
long newWriteBufferPeriodicFlushTimerTickMs =
params.getWriteBufferPeriodicFlushTimerTickMs() != UNSET
? params.getWriteBufferPeriodicFlushTimerTickMs()
: tableConf.getWriteBufferPeriodicFlushTimerTickMs();
: connConf.getWriteBufferPeriodicFlushTimerTickMs();
this.setWriteBufferPeriodicFlush(
newWriteBufferPeriodicFlushTimeoutMs,
newWriteBufferPeriodicFlushTimerTickMs);

this.maxKeyValueSize = params.getMaxKeyValueSize() != BufferedMutatorParams.UNSET ?
params.getMaxKeyValueSize() : tableConf.getMaxKeyValueSize();

this.writeRpcTimeout = conn.getConfiguration().getInt(HConstants.HBASE_RPC_WRITE_TIMEOUT_KEY,
conn.getConfiguration().getInt(HConstants.HBASE_RPC_TIMEOUT_KEY,
HConstants.DEFAULT_HBASE_RPC_TIMEOUT));
this.operationTimeout = conn.getConfiguration().getInt(
HConstants.HBASE_CLIENT_OPERATION_TIMEOUT,
HConstants.DEFAULT_HBASE_CLIENT_OPERATION_TIMEOUT);
params.getMaxKeyValueSize() : connConf.getMaxKeyValueSize();

this.writeRpcTimeout = connConf.getWriteRpcTimeout();
this.operationTimeout = connConf.getOperationTimeout();
// puts need to track errors globally due to how the APIs currently work.
ap = new AsyncProcess(connection, conf, pool, rpcCallerFactory, true, rpcFactory, writeRpcTimeout);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
package org.apache.hadoop.hbase.client;

import com.google.common.annotations.VisibleForTesting;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.classification.InterfaceAudience;
Expand All @@ -26,6 +28,7 @@
*/
@InterfaceAudience.Private
public class ConnectionConfiguration {
static final Log LOG = LogFactory.getLog(ConnectionConfiguration.class);

public static final String WRITE_BUFFER_SIZE_KEY = "hbase.client.write.buffer";
public static final long WRITE_BUFFER_SIZE_DEFAULT = 2097152;
Expand All @@ -50,6 +53,10 @@ public class ConnectionConfiguration {
private final int metaReplicaCallTimeoutMicroSecondScan;
private final int retries;
private final int maxKeyValueSize;
private final int readRpcTimeout;
private final int writeRpcTimeout;
private final long pause;
private final long pauseForCQTBE;

/**
* Constructor
Expand Down Expand Up @@ -90,9 +97,28 @@ public class ConnectionConfiguration {
HConstants.HBASE_CLIENT_META_REPLICA_SCAN_TIMEOUT_DEFAULT);

this.retries = conf.getInt(
HConstants.HBASE_CLIENT_RETRIES_NUMBER, HConstants.DEFAULT_HBASE_CLIENT_RETRIES_NUMBER);
HConstants.HBASE_CLIENT_RETRIES_NUMBER, HConstants.DEFAULT_HBASE_CLIENT_RETRIES_NUMBER);

this.maxKeyValueSize = conf.getInt(MAX_KEYVALUE_SIZE_KEY, MAX_KEYVALUE_SIZE_DEFAULT);

this.readRpcTimeout = conf.getInt(HConstants.HBASE_RPC_READ_TIMEOUT_KEY,
conf.getInt(HConstants.HBASE_RPC_TIMEOUT_KEY,
HConstants.DEFAULT_HBASE_RPC_TIMEOUT));

this.writeRpcTimeout = conf.getInt(HConstants.HBASE_RPC_WRITE_TIMEOUT_KEY,
conf.getInt(HConstants.HBASE_RPC_TIMEOUT_KEY,
HConstants.DEFAULT_HBASE_RPC_TIMEOUT));

this.pause = conf.getLong(HConstants.HBASE_CLIENT_PAUSE, HConstants.DEFAULT_HBASE_CLIENT_PAUSE);
long configuredPauseForCQTBE = conf.getLong(HConstants.HBASE_CLIENT_PAUSE_FOR_CQTBE, pause);
if (configuredPauseForCQTBE < pause) {
LOG.warn("The " + HConstants.HBASE_CLIENT_PAUSE_FOR_CQTBE + " setting: "
+ configuredPauseForCQTBE + " is smaller than " + HConstants.HBASE_CLIENT_PAUSE
+ ", will use " + pause + " instead.");
this.pauseForCQTBE = pause;
} else {
this.pauseForCQTBE = configuredPauseForCQTBE;
}
}

/**
Expand All @@ -115,6 +141,10 @@ protected ConnectionConfiguration() {
HConstants.HBASE_CLIENT_META_REPLICA_SCAN_TIMEOUT_DEFAULT;
this.retries = HConstants.DEFAULT_HBASE_CLIENT_RETRIES_NUMBER;
this.maxKeyValueSize = MAX_KEYVALUE_SIZE_DEFAULT;
this.readRpcTimeout = HConstants.DEFAULT_HBASE_RPC_TIMEOUT;
this.writeRpcTimeout = HConstants.DEFAULT_HBASE_RPC_TIMEOUT;
this.pause = HConstants.DEFAULT_HBASE_CLIENT_PAUSE;
this.pauseForCQTBE = HConstants.DEFAULT_HBASE_CLIENT_PAUSE;
}

public long getWriteBufferSize() {
Expand Down Expand Up @@ -164,4 +194,20 @@ public int getMaxKeyValueSize() {
public long getScannerMaxResultSize() {
return scannerMaxResultSize;
}

public int getReadRpcTimeout() {
return readRpcTimeout;
}

public int getWriteRpcTimeout() {
return writeRpcTimeout;
}

public long getPause() {
return pause;
}

public long getPauseForCQTBE() {
return pauseForCQTBE;
}
}
Loading