Repository: hbase Updated Branches: refs/heads/branch-2.1 a08c2c269 -> 4ad63d77b
HBASE-21345 [hbck2] Allow version check to proceed even though master is 'initializing'. Just remove the check state from the getClusterStatus call. Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/4ad63d77 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/4ad63d77 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/4ad63d77 Branch: refs/heads/branch-2.1 Commit: 4ad63d77be3656f5aa63cdbf4f2420e4d8bb2e6e Parents: a08c2c2 Author: Michael Stack <[email protected]> Authored: Fri Oct 19 11:02:55 2018 -0700 Committer: Michael Stack <[email protected]> Committed: Fri Oct 19 17:40:03 2018 -0700 ---------------------------------------------------------------------- .../java/org/apache/hadoop/hbase/master/MasterRpcServices.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/4ad63d77/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java index 294e604..3ec394a 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java @@ -921,7 +921,10 @@ public class MasterRpcServices extends RSRpcServices GetClusterStatusRequest req) throws ServiceException { GetClusterStatusResponse.Builder response = GetClusterStatusResponse.newBuilder(); try { - master.checkInitialized(); + // We used to check if Master was up at this point but let this call proceed even if + // Master is initializing... else we shut out stuff like hbck2 tool from making progress + // since it queries this method to figure cluster version. hbck2 wants to be able to work + // against Master even if it is 'initializing' so it can do fixup. response.setClusterStatus(ClusterMetricsBuilder.toClusterStatus( master.getClusterMetrics(ClusterMetricsBuilder.toOptions(req.getOptionsList())))); } catch (IOException e) {
