Search in sources :

Example 1 with DiskBalancerSettingRequestProto

use of org.apache.hadoop.hdfs.protocol.proto.ClientDatanodeProtocolProtos.DiskBalancerSettingRequestProto in project hadoop by apache.

the class ClientDatanodeProtocolTranslatorPB method getDiskBalancerSetting.

@Override
public String getDiskBalancerSetting(String key) throws IOException {
    try {
        DiskBalancerSettingRequestProto request = DiskBalancerSettingRequestProto.newBuilder().setKey(key).build();
        DiskBalancerSettingResponseProto response = rpcProxy.getDiskBalancerSetting(NULL_CONTROLLER, request);
        return response.hasValue() ? response.getValue() : null;
    } catch (ServiceException e) {
        throw ProtobufHelper.getRemoteException(e);
    }
}
Also used : DiskBalancerSettingRequestProto(org.apache.hadoop.hdfs.protocol.proto.ClientDatanodeProtocolProtos.DiskBalancerSettingRequestProto) DiskBalancerSettingResponseProto(org.apache.hadoop.hdfs.protocol.proto.ClientDatanodeProtocolProtos.DiskBalancerSettingResponseProto) ServiceException(com.google.protobuf.ServiceException)

Aggregations

ServiceException (com.google.protobuf.ServiceException)1 DiskBalancerSettingRequestProto (org.apache.hadoop.hdfs.protocol.proto.ClientDatanodeProtocolProtos.DiskBalancerSettingRequestProto)1 DiskBalancerSettingResponseProto (org.apache.hadoop.hdfs.protocol.proto.ClientDatanodeProtocolProtos.DiskBalancerSettingResponseProto)1