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
|
@Override
|
||||||
public GetTableStateResponse setTableStateInMeta(RpcController controller,
|
public GetTableStateResponse setTableStateInMeta(RpcController controller,
|
||||||
SetTableStateInMetaRequest request) throws ServiceException {
|
SetTableStateInMetaRequest request) throws ServiceException {
|
||||||
Connection conn = master.getConnection();
|
|
||||||
TableName tn = ProtobufUtil.toTableName(request.getTableName());
|
TableName tn = ProtobufUtil.toTableName(request.getTableName());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
HBaseProtos.TableState prevState = MetaTableAccessor.getTableState(conn, tn).convert();
|
HBaseProtos.TableState prevState =
|
||||||
MetaTableAccessor.updateTableState(conn, tn,
|
this.master.getTableStateManager().getTableState(tn).convert();
|
||||||
|
this.master.getTableStateManager().setTableState(tn,
|
||||||
TableState.convert(tn, request.getTableState()).getState());
|
TableState.convert(tn, request.getTableState()).getState());
|
||||||
return GetTableStateResponse.newBuilder().setTableState(prevState).build();
|
return GetTableStateResponse.newBuilder().setTableState(prevState).build();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue