HBASE-22742 [HBCK2] Add more log for hbck operations at master side
Signed-off-by: stack <stack@apache.org>
This commit is contained in:
parent
fa77c75848
commit
1cb37f18aa
|
@ -2383,11 +2383,12 @@ public class MasterRpcServices extends RSRpcServices
|
||||||
SetTableStateInMetaRequest request) throws ServiceException {
|
SetTableStateInMetaRequest request) throws ServiceException {
|
||||||
TableName tn = ProtobufUtil.toTableName(request.getTableName());
|
TableName tn = ProtobufUtil.toTableName(request.getTableName());
|
||||||
try {
|
try {
|
||||||
HBaseProtos.TableState prevState =
|
TableState prevState = this.master.getTableStateManager().getTableState(tn);
|
||||||
this.master.getTableStateManager().getTableState(tn).convert();
|
TableState newState = TableState.convert(tn, request.getTableState());
|
||||||
this.master.getTableStateManager().setTableState(tn,
|
LOG.info("{} set table={} state from {} to {}", master.getClientIdAuditPrefix(),
|
||||||
TableState.convert(tn, request.getTableState()).getState());
|
tn, prevState.getState(), newState.getState());
|
||||||
return GetTableStateResponse.newBuilder().setTableState(prevState).build();
|
this.master.getTableStateManager().setTableState(tn, newState.getState());
|
||||||
|
return GetTableStateResponse.newBuilder().setTableState(prevState.convert()).build();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ServiceException(e);
|
throw new ServiceException(e);
|
||||||
}
|
}
|
||||||
|
@ -2424,7 +2425,6 @@ public class MasterRpcServices extends RSRpcServices
|
||||||
public MasterProtos.AssignsResponse assigns(RpcController controller,
|
public MasterProtos.AssignsResponse assigns(RpcController controller,
|
||||||
MasterProtos.AssignsRequest request)
|
MasterProtos.AssignsRequest request)
|
||||||
throws ServiceException {
|
throws ServiceException {
|
||||||
LOG.info(master.getClientIdAuditPrefix() + " assigns");
|
|
||||||
if (this.master.getMasterProcedureExecutor() == null) {
|
if (this.master.getMasterProcedureExecutor() == null) {
|
||||||
throw new ServiceException("Master's ProcedureExecutor not initialized; retry later");
|
throw new ServiceException("Master's ProcedureExecutor not initialized; retry later");
|
||||||
}
|
}
|
||||||
|
@ -2432,6 +2432,7 @@ public class MasterRpcServices extends RSRpcServices
|
||||||
MasterProtos.AssignsResponse.newBuilder();
|
MasterProtos.AssignsResponse.newBuilder();
|
||||||
try {
|
try {
|
||||||
boolean override = request.getOverride();
|
boolean override = request.getOverride();
|
||||||
|
LOG.info("{} assigns, override={}", master.getClientIdAuditPrefix(), override);
|
||||||
for (HBaseProtos.RegionSpecifier rs: request.getRegionList()) {
|
for (HBaseProtos.RegionSpecifier rs: request.getRegionList()) {
|
||||||
RegionInfo ri = getRegionInfo(rs);
|
RegionInfo ri = getRegionInfo(rs);
|
||||||
if (ri == null) {
|
if (ri == null) {
|
||||||
|
@ -2456,7 +2457,6 @@ public class MasterRpcServices extends RSRpcServices
|
||||||
public MasterProtos.UnassignsResponse unassigns(RpcController controller,
|
public MasterProtos.UnassignsResponse unassigns(RpcController controller,
|
||||||
MasterProtos.UnassignsRequest request)
|
MasterProtos.UnassignsRequest request)
|
||||||
throws ServiceException {
|
throws ServiceException {
|
||||||
LOG.info(master.getClientIdAuditPrefix() + " unassigns");
|
|
||||||
if (this.master.getMasterProcedureExecutor() == null) {
|
if (this.master.getMasterProcedureExecutor() == null) {
|
||||||
throw new ServiceException("Master's ProcedureExecutor not initialized; retry later");
|
throw new ServiceException("Master's ProcedureExecutor not initialized; retry later");
|
||||||
}
|
}
|
||||||
|
@ -2464,6 +2464,7 @@ public class MasterRpcServices extends RSRpcServices
|
||||||
MasterProtos.UnassignsResponse.newBuilder();
|
MasterProtos.UnassignsResponse.newBuilder();
|
||||||
try {
|
try {
|
||||||
boolean override = request.getOverride();
|
boolean override = request.getOverride();
|
||||||
|
LOG.info("{} unassigns, override={}", master.getClientIdAuditPrefix(), override);
|
||||||
for (HBaseProtos.RegionSpecifier rs: request.getRegionList()) {
|
for (HBaseProtos.RegionSpecifier rs: request.getRegionList()) {
|
||||||
RegionInfo ri = getRegionInfo(rs);
|
RegionInfo ri = getRegionInfo(rs);
|
||||||
if (ri == null) {
|
if (ri == null) {
|
||||||
|
@ -2495,6 +2496,9 @@ public class MasterRpcServices extends RSRpcServices
|
||||||
public MasterProtos.BypassProcedureResponse bypassProcedure(RpcController controller,
|
public MasterProtos.BypassProcedureResponse bypassProcedure(RpcController controller,
|
||||||
MasterProtos.BypassProcedureRequest request) throws ServiceException {
|
MasterProtos.BypassProcedureRequest request) throws ServiceException {
|
||||||
try {
|
try {
|
||||||
|
LOG.info("{} bypass procedures={}, waitTime={}, override={}, recursive={}",
|
||||||
|
master.getClientIdAuditPrefix(), request.getProcIdList(), request.getWaitTime(),
|
||||||
|
request.getOverride(), request.getRecursive());
|
||||||
List<Boolean> ret =
|
List<Boolean> ret =
|
||||||
master.getMasterProcedureExecutor().bypassProcedure(request.getProcIdList(),
|
master.getMasterProcedureExecutor().bypassProcedure(request.getProcIdList(),
|
||||||
request.getWaitTime(), request.getOverride(), request.getRecursive());
|
request.getWaitTime(), request.getOverride(), request.getRecursive());
|
||||||
|
@ -2513,6 +2517,8 @@ public class MasterRpcServices extends RSRpcServices
|
||||||
try {
|
try {
|
||||||
for (HBaseProtos.ServerName serverName : serverNames) {
|
for (HBaseProtos.ServerName serverName : serverNames) {
|
||||||
ServerName server = ProtobufUtil.toServerName(serverName);
|
ServerName server = ProtobufUtil.toServerName(serverName);
|
||||||
|
LOG.info("{} schedule ServerCrashProcedure for {}",
|
||||||
|
master.getClientIdAuditPrefix(), server);
|
||||||
if (shouldSubmitSCP(server)) {
|
if (shouldSubmitSCP(server)) {
|
||||||
master.getServerManager().moveFromOnlineToDeadServers(server);
|
master.getServerManager().moveFromOnlineToDeadServers(server);
|
||||||
ProcedureExecutor<MasterProcedureEnv> procExec = this.master.getMasterProcedureExecutor();
|
ProcedureExecutor<MasterProcedureEnv> procExec = this.master.getMasterProcedureExecutor();
|
||||||
|
|
Loading…
Reference in New Issue