Search in sources :

Example 1 with SetErasureCodingPolicyRequestProto

use of org.apache.hadoop.hdfs.protocol.proto.ErasureCodingProtos.SetErasureCodingPolicyRequestProto in project hadoop by apache.

the class ClientNamenodeProtocolTranslatorPB method setErasureCodingPolicy.

@Override
public void setErasureCodingPolicy(String src, String ecPolicyName) throws IOException {
    final SetErasureCodingPolicyRequestProto.Builder builder = SetErasureCodingPolicyRequestProto.newBuilder();
    builder.setSrc(src);
    builder.setEcPolicyName(ecPolicyName);
    SetErasureCodingPolicyRequestProto req = builder.build();
    try {
        rpcProxy.setErasureCodingPolicy(null, req);
    } catch (ServiceException e) {
        throw ProtobufHelper.getRemoteException(e);
    }
}
Also used : ServiceException(com.google.protobuf.ServiceException) SetErasureCodingPolicyRequestProto(org.apache.hadoop.hdfs.protocol.proto.ErasureCodingProtos.SetErasureCodingPolicyRequestProto)

Aggregations

ServiceException (com.google.protobuf.ServiceException)1 SetErasureCodingPolicyRequestProto (org.apache.hadoop.hdfs.protocol.proto.ErasureCodingProtos.SetErasureCodingPolicyRequestProto)1