HBASE-23726 Forward-port HBASE-21345 to branch-2.2, 2.3 & master as well.
HBASE-21345 - [hbck2] Allow version check to proceed even though master is 'initializing'.
Just remove the check state from the getClusterStatus call.
Signed-off-by: Michael Stack <stack@apache.org>
Signed-off-by: Peter Somogyi <psomogyi@apache.org>
Signed-off-by: Sakthi <sakthi@apache.org>
(cherry picked from commit dd8496a546
)
This commit is contained in:
parent
3c1bccb0f8
commit
753cc99814
|
@ -972,7 +972,10 @@ public class MasterRpcServices extends RSRpcServices
|
||||||
GetClusterStatusRequest req) throws ServiceException {
|
GetClusterStatusRequest req) throws ServiceException {
|
||||||
GetClusterStatusResponse.Builder response = GetClusterStatusResponse.newBuilder();
|
GetClusterStatusResponse.Builder response = GetClusterStatusResponse.newBuilder();
|
||||||
try {
|
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(
|
response.setClusterStatus(ClusterMetricsBuilder.toClusterStatus(
|
||||||
master.getClusterMetrics(ClusterMetricsBuilder.toOptions(req.getOptionsList()))));
|
master.getClusterMetrics(ClusterMetricsBuilder.toOptions(req.getOptionsList()))));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
Loading…
Reference in New Issue