use of org.apache.hadoop.hdfs.protocol.proto.ErasureCodingProtos.GetErasureCodingPolicyResponseProto in project hadoop by apache.
the class ClientNamenodeProtocolServerSideTranslatorPB method getErasureCodingPolicy.
@Override
public GetErasureCodingPolicyResponseProto getErasureCodingPolicy(RpcController controller, GetErasureCodingPolicyRequestProto request) throws ServiceException {
try {
ErasureCodingPolicy ecPolicy = server.getErasureCodingPolicy(request.getSrc());
GetErasureCodingPolicyResponseProto.Builder builder = GetErasureCodingPolicyResponseProto.newBuilder();
if (ecPolicy != null) {
builder.setEcPolicy(PBHelperClient.convertErasureCodingPolicy(ecPolicy));
}
return builder.build();
} catch (IOException e) {
throw new ServiceException(e);
}
}
Aggregations