use of org.apache.hadoop.hbase.shaded.protobuf.generated.RSGroupAdminProtos.UpdateRSGroupConfigResponse in project hbase by apache.
the class MasterRpcServices method updateRSGroupConfig.
@Override
public UpdateRSGroupConfigResponse updateRSGroupConfig(RpcController controller, UpdateRSGroupConfigRequest request) throws ServiceException {
UpdateRSGroupConfigResponse.Builder builder = UpdateRSGroupConfigResponse.newBuilder();
String groupName = request.getGroupName();
Map<String, String> configuration = new HashMap<>();
request.getConfigurationList().forEach(p -> configuration.put(p.getName(), p.getValue()));
LOG.info("{} update rsgroup {} configuration {}", server.getClientIdAuditPrefix(), groupName, configuration);
try {
if (server.getMasterCoprocessorHost() != null) {
server.getMasterCoprocessorHost().preUpdateRSGroupConfig(groupName, configuration);
}
server.getRSGroupInfoManager().updateRSGroupConfig(groupName, configuration);
if (server.getMasterCoprocessorHost() != null) {
server.getMasterCoprocessorHost().postUpdateRSGroupConfig(groupName, configuration);
}
} catch (IOException e) {
throw new ServiceException(e);
}
return builder.build();
}
Aggregations