Search in sources :

Example 1 with SubmitDiskBalancerPlanResponseProto

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

the class ClientDatanodeProtocolServerSideTranslatorPB method submitDiskBalancerPlan.

/**
   * Submit a disk balancer plan for execution.
   * @param controller  - RpcController
   * @param request   - Request
   * @return   Response
   * @throws ServiceException
   */
@Override
public SubmitDiskBalancerPlanResponseProto submitDiskBalancerPlan(RpcController controller, SubmitDiskBalancerPlanRequestProto request) throws ServiceException {
    try {
        impl.submitDiskBalancerPlan(request.getPlanID(), request.hasPlanVersion() ? request.getPlanVersion() : 1, request.hasPlanFile() ? request.getPlanFile() : "", request.getPlan(), request.hasIgnoreDateCheck() ? request.getIgnoreDateCheck() : false);
        SubmitDiskBalancerPlanResponseProto response = SubmitDiskBalancerPlanResponseProto.newBuilder().build();
        return response;
    } catch (Exception e) {
        throw new ServiceException(e);
    }
}
Also used : ServiceException(com.google.protobuf.ServiceException) SubmitDiskBalancerPlanResponseProto(org.apache.hadoop.hdfs.protocol.proto.ClientDatanodeProtocolProtos.SubmitDiskBalancerPlanResponseProto) ServiceException(com.google.protobuf.ServiceException) IOException(java.io.IOException)

Aggregations

ServiceException (com.google.protobuf.ServiceException)1 IOException (java.io.IOException)1 SubmitDiskBalancerPlanResponseProto (org.apache.hadoop.hdfs.protocol.proto.ClientDatanodeProtocolProtos.SubmitDiskBalancerPlanResponseProto)1