use of org.apache.hadoop.hbase.shaded.protobuf.generated.RSGroupAdminProtos.GetRSGroupInfoOfServerResponse in project hbase by apache.
the class MasterRpcServices method getRSGroupInfoOfServer.
@Override
public GetRSGroupInfoOfServerResponse getRSGroupInfoOfServer(RpcController controller, GetRSGroupInfoOfServerRequest request) throws ServiceException {
Address hp = Address.fromParts(request.getServer().getHostName(), request.getServer().getPort());
LOG.info(server.getClientIdAuditPrefix() + " initiates rsgroup info retrieval, server=" + hp);
try {
if (server.getMasterCoprocessorHost() != null) {
server.getMasterCoprocessorHost().preGetRSGroupInfoOfServer(hp);
}
RSGroupInfo rsGroupInfo = server.getRSGroupInfoManager().getRSGroupOfServer(hp);
GetRSGroupInfoOfServerResponse resp;
if (rsGroupInfo != null) {
resp = GetRSGroupInfoOfServerResponse.newBuilder().setRSGroupInfo(ProtobufUtil.toProtoGroupInfo(rsGroupInfo)).build();
} else {
resp = GetRSGroupInfoOfServerResponse.getDefaultInstance();
}
if (server.getMasterCoprocessorHost() != null) {
server.getMasterCoprocessorHost().postGetRSGroupInfoOfServer(hp);
}
return resp;
} catch (IOException e) {
throw new ServiceException(e);
}
}
use of org.apache.hadoop.hbase.shaded.protobuf.generated.RSGroupAdminProtos.GetRSGroupInfoOfServerResponse in project hbase by apache.
the class RSGroupAdminServiceImpl method getRSGroupInfoOfServer.
@Override
public void getRSGroupInfoOfServer(RpcController controller, GetRSGroupInfoOfServerRequest request, RpcCallback<GetRSGroupInfoOfServerResponse> done) {
GetRSGroupInfoOfServerResponse.Builder builder = GetRSGroupInfoOfServerResponse.newBuilder();
Address hp = Address.fromParts(request.getServer().getHostName(), request.getServer().getPort());
LOG.info(master.getClientIdAuditPrefix() + " initiates rsgroup info retrieval, server=" + hp);
try {
if (master.getMasterCoprocessorHost() != null) {
master.getMasterCoprocessorHost().preGetRSGroupInfoOfServer(hp);
}
RSGroupInfo info = rsGroupInfoManager.getRSGroupOfServer(hp);
if (info != null) {
builder.setRSGroupInfo(ProtobufUtil.toProtoGroupInfo(fillTables(info)));
}
if (master.getMasterCoprocessorHost() != null) {
master.getMasterCoprocessorHost().postGetRSGroupInfoOfServer(hp);
}
} catch (IOException e) {
CoprocessorRpcUtils.setControllerException(controller, e);
}
done.run(builder.build());
}
Aggregations