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
Nested ClassesModifier and TypeClassDescriptionprivate static classThe record of errors for a server. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longprivate final intprivate final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) longcalculateBackoffTime(ServerName server, long basePause) Calculates the back-off time for a retrying request to a particular server.(package private) booleancanTryMore(int numAttempt) We stop to retry when we have exhausted BOTH the number of tries and the time allocated.(package private) long(package private) voidreportServerError(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()
-