Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-26809: Report client backoff time for server overloaded#4786
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
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
140878e
HBASE-26809 Report client backoff time for server overloaded in Conne…
30aa833
Fix test in hbase-server
45ad745
Remmediate failing test
5b1835e
remove RpcRetryingCallerImpl overloaded constructor
d362c48
add metricsConnection to rpcretryingcallerfactory
76c763d
Add null check for connection metrics
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4 hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncBatchRpcRetryingCaller.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6 hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5 hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRpcRetryingCaller.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7 .../src/main/java/org/apache/hadoop/hbase/client/AsyncScanSingleRegionRpcRetryingCaller.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 12 additions & 5 deletions
17 hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5 hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3 hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTableMultiplexer.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8 hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 17 additions & 10 deletions
27 hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerFactory.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 8 additions & 7 deletions
15 hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCallerImpl.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -26,6 +26,7 @@ | ||
| import java.time.Instant; | ||
| import java.util.ArrayList; | ||
| import java.util.List; | ||
| import java.util.concurrent.TimeUnit; | ||
| import java.util.concurrent.atomic.AtomicBoolean; | ||
| import org.apache.hadoop.hbase.DoNotRetryIOException; | ||
| import org.apache.hadoop.hbase.HBaseServerException; | ||
| @@ -63,15 +64,11 @@ public class RpcRetryingCallerImpl<T> implements RpcRetryingCaller<T> { | ||
| private final RetryingCallerInterceptor interceptor; | ||
| private final RetryingCallerInterceptorContext context; | ||
| private final RetryingTimeTracker tracker; | ||
| private final MetricsConnection metrics; | ||
| public RpcRetryingCallerImpl(long pause, long pauseForServerOverloaded, int retries, | ||
briaugenreich marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| int startLogErrorsCnt) { | ||
| this(pause, pauseForServerOverloaded, retries, | ||
| RetryingCallerInterceptorFactory.NO_OP_INTERCEPTOR, startLogErrorsCnt, 0); | ||
| } | ||
| public RpcRetryingCallerImpl(long pause, long pauseForServerOverloaded, int retries, | ||
| RetryingCallerInterceptor interceptor, int startLogErrorsCnt, int rpcTimeout) { | ||
| RetryingCallerInterceptor interceptor, int startLogErrorsCnt, int rpcTimeout, | ||
| MetricsConnection metricsConnection) { | ||
| this.pause = pause; | ||
| this.pauseForServerOverloaded = pauseForServerOverloaded; | ||
| this.maxAttempts = retries2Attempts(retries); | ||
| @@ -80,6 +77,7 @@ public RpcRetryingCallerImpl(long pause, long pauseForServerOverloaded, int retr | ||
| this.startLogErrorsCnt = startLogErrorsCnt; | ||
| this.tracker = new RetryingTimeTracker(); | ||
| this.rpcTimeout = rpcTimeout; | ||
| this.metrics = metricsConnection; | ||
| } | ||
| @Override | ||
| @@ -158,6 +156,9 @@ public T callWithRetries(RetryingCallable<T> callable, int callTimeout) | ||
| + t.getMessage() + " " + callable.getExceptionMessageAdditionalDetail(); | ||
| throw (SocketTimeoutException) new SocketTimeoutException(msg).initCause(t); | ||
| } | ||
| if (metrics != null && HBaseServerException.isServerOverloaded(t)) { | ||
| metrics.incrementServerOverloadedBackoffTime(expectedSleep, TimeUnit.MILLISECONDS); | ||
| } | ||
| } finally { | ||
| interceptor.updateFailureInfo(context); | ||
| } | ||
12 changes: 8 additions & 4 deletions
12 hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallableWithReplicas.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4 hbase-client/src/main/java/org/apache/hadoop/hbase/client/SecureBulkLoadClient.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8 hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3 ...ent/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcessWithRegionException.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4 hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestRpcRetryingCallerImpl.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3 hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4 ...va/org/apache/hadoop/hbase/replication/regionserver/RegionReplicaReplicationEndpoint.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2 hbase-server/src/main/java/org/apache/hadoop/hbase/tool/LoadIncrementalHFiles.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.