Repository: hbase
Updated Branches:
  refs/heads/branch-2.0 358ac814d -> 06d6fe3a9


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/06d6fe3a
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/06d6fe3a
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/06d6fe3a

Branch: refs/heads/branch-2.0
Commit: 06d6fe3a9c566df6165765f58f03a61cee04463f
Parents: 358ac81
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:40 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/06d6fe3a/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 48a41ee..70a3c62 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
@@ -895,7 +895,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) {

Reply via email to