Package org.apache.hadoop.hbase.client
Class ConnectionImplementation.ServerErrorTracker
java.lang.Object
org.apache.hadoop.hbase.client.ConnectionImplementation.ServerErrorTracker
- Enclosing class:
- ConnectionImplementation
The record of errors for servers.
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
The record of errors for a server. -
Field Summary
Modifier and TypeFieldDescriptionprivate final long
private final int
private final long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) long
calculateBackoffTime
(ServerName server, long basePause) Calculates the back-off time for a retrying request to a particular server.(package private) boolean
canTryMore
(int numAttempt) We stop to retry when we have exhausted BOTH the number of tries and the time allocated.(package private) long
(package private) void
reportServerError
(ServerName server) Reports that there was an error on the server to do whatever bean-counting necessary.
-
Field Details
-
errorsByServer
-
canRetryUntil
-
maxTries
-
startTrackingTime
-
-
Constructor Details
-
ServerErrorTracker
Constructor- Parameters:
timeout
- how long to wait before timeout, in unit of millisecondmaxTries
- how many times to try
-
-
Method Details
-
canTryMore
We stop to retry when we have exhausted BOTH the number of tries and the time allocated.- Parameters:
numAttempt
- how many times we have tried by now
-
calculateBackoffTime
Calculates the back-off time for a retrying request to a particular server.- Parameters:
server
- The server in question.basePause
- The default hci pause.- Returns:
- The time to wait before sending next request.
-
reportServerError
Reports that there was an error on the server to do whatever bean-counting necessary.- Parameters:
server
- The server in question.
-
getStartTrackingTime
long getStartTrackingTime()
-