use of org.apache.hadoop.hbase.shaded.protobuf.generated.RSGroupAdminProtos.AddRSGroupResponse in project hbase by apache.
the class MasterRpcServices method addRSGroup.
@Override
public AddRSGroupResponse addRSGroup(RpcController controller, AddRSGroupRequest request) throws ServiceException {
AddRSGroupResponse.Builder builder = AddRSGroupResponse.newBuilder();
LOG.info(server.getClientIdAuditPrefix() + " add rsgroup " + request.getRSGroupName());
try {
if (server.getMasterCoprocessorHost() != null) {
server.getMasterCoprocessorHost().preAddRSGroup(request.getRSGroupName());
}
server.getRSGroupInfoManager().addRSGroup(new RSGroupInfo(request.getRSGroupName()));
if (server.getMasterCoprocessorHost() != null) {
server.getMasterCoprocessorHost().postAddRSGroup(request.getRSGroupName());
}
} catch (IOException e) {
throw new ServiceException(e);
}
return builder.build();
}
Aggregations