Search in sources :

Example 1 with GetTableStateResponse

use of org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetTableStateResponse in project hbase by apache.

the class MasterRpcServices method getTableState.

@Override
public GetTableStateResponse getTableState(RpcController controller, GetTableStateRequest request) throws ServiceException {
    try {
        server.checkServiceStarted();
        TableName tableName = ProtobufUtil.toTableName(request.getTableName());
        TableState ts = server.getTableStateManager().getTableState(tableName);
        GetTableStateResponse.Builder builder = GetTableStateResponse.newBuilder();
        builder.setTableState(ts.convert());
        return builder.build();
    } catch (IOException e) {
        throw new ServiceException(e);
    }
}
Also used : TableName(org.apache.hadoop.hbase.TableName) ServiceException(org.apache.hbase.thirdparty.com.google.protobuf.ServiceException) IOException(java.io.IOException) DoNotRetryIOException(org.apache.hadoop.hbase.DoNotRetryIOException) GetTableStateResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetTableStateResponse) TableState(org.apache.hadoop.hbase.client.TableState)

Aggregations

IOException (java.io.IOException)1 DoNotRetryIOException (org.apache.hadoop.hbase.DoNotRetryIOException)1 TableName (org.apache.hadoop.hbase.TableName)1 TableState (org.apache.hadoop.hbase.client.TableState)1 GetTableStateResponse (org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetTableStateResponse)1 ServiceException (org.apache.hbase.thirdparty.com.google.protobuf.ServiceException)1