use of org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ErasureCodingPolicyProto in project hadoop by apache.
the class ClientNamenodeProtocolTranslatorPB method getErasureCodingPolicies.
@Override
public ErasureCodingPolicy[] getErasureCodingPolicies() throws IOException {
try {
GetErasureCodingPoliciesResponseProto response = rpcProxy.getErasureCodingPolicies(null, VOID_GET_EC_POLICIES_REQUEST);
ErasureCodingPolicy[] ecPolicies = new ErasureCodingPolicy[response.getEcPoliciesCount()];
int i = 0;
for (ErasureCodingPolicyProto ecPolicyProto : response.getEcPoliciesList()) {
ecPolicies[i++] = PBHelperClient.convertErasureCodingPolicy(ecPolicyProto);
}
return ecPolicies;
} catch (ServiceException e) {
throw ProtobufHelper.getRemoteException(e);
}
}
Aggregations