Search in sources :

Example 1 with UpdateRSGroupConfigResponse

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();
}
Also used : UpdateRSGroupConfigResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.RSGroupAdminProtos.UpdateRSGroupConfigResponse) ServiceException(org.apache.hbase.thirdparty.com.google.protobuf.ServiceException) HashMap(java.util.HashMap) ByteString(org.apache.hbase.thirdparty.com.google.protobuf.ByteString) IOException(java.io.IOException) DoNotRetryIOException(org.apache.hadoop.hbase.DoNotRetryIOException)

Aggregations

IOException (java.io.IOException)1 HashMap (java.util.HashMap)1 DoNotRetryIOException (org.apache.hadoop.hbase.DoNotRetryIOException)1 UpdateRSGroupConfigResponse (org.apache.hadoop.hbase.shaded.protobuf.generated.RSGroupAdminProtos.UpdateRSGroupConfigResponse)1 ByteString (org.apache.hbase.thirdparty.com.google.protobuf.ByteString)1 ServiceException (org.apache.hbase.thirdparty.com.google.protobuf.ServiceException)1