HBASE-21164 reportForDuty should do backoff rather than retry
commit08c4d70aaf0079fa1d0d74d5874f0f2639474138
authorMingliang Liu <liuml07@apache.org>
Fri, 7 Sep 2018 06:01:52 +0000 (6 23:01 -0700)
committerMichael Stack <stack@apache.org>
Tue, 25 Sep 2018 18:32:28 +0000 (25 11:32 -0700)
treeff9133c2cffb253b1dd6b67534d86054680c09ae
parent27369136be331a2378e433c23c49a6534c38f8b8
HBASE-21164 reportForDuty should do backoff rather than retry

Remove unused methods from Sleeper (its ok, its @Private).
Remove notion of startTime from Sleeper handling (it is is unused).
Allow passing in how long to sleep so can maintain externally.
In HRS, use a RetryCounter to calculate backoff sleep time for when
reportForDuty is failing against a struggling Master.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/Sleeper.java
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerReportForDuty.java