HBASE-21214 [hbck2] setTableState just sets hbase:meta state, not in-memory state
This commit is contained in:
parent
1010992ee8
commit
98909f4a9d
|
@ -2329,12 +2329,11 @@ public class MasterRpcServices extends RSRpcServices
|
|||
@Override
|
||||
public GetTableStateResponse setTableStateInMeta(RpcController controller,
|
||||
SetTableStateInMetaRequest request) throws ServiceException {
|
||||
Connection conn = master.getConnection();
|
||||
TableName tn = ProtobufUtil.toTableName(request.getTableName());
|
||||
|
||||
try {
|
||||
HBaseProtos.TableState prevState = MetaTableAccessor.getTableState(conn, tn).convert();
|
||||
MetaTableAccessor.updateTableState(conn, tn,
|
||||
HBaseProtos.TableState prevState =
|
||||
this.master.getTableStateManager().getTableState(tn).convert();
|
||||
this.master.getTableStateManager().setTableState(tn,
|
||||
TableState.convert(tn, request.getTableState()).getState());
|
||||
return GetTableStateResponse.newBuilder().setTableState(prevState).build();
|
||||
} catch (Exception e) {
|
||||
|
|
Loading…
Reference in New Issue