use of org.apache.hadoop.hdfs.protocol.proto.EncryptionZonesProtos.EncryptionZoneProto in project hadoop by apache.
the class ClientNamenodeProtocolTranslatorPB method listEncryptionZones.
@Override
public BatchedEntries<EncryptionZone> listEncryptionZones(long id) throws IOException {
final ListEncryptionZonesRequestProto req = ListEncryptionZonesRequestProto.newBuilder().setId(id).build();
try {
EncryptionZonesProtos.ListEncryptionZonesResponseProto response = rpcProxy.listEncryptionZones(null, req);
List<EncryptionZone> elements = Lists.newArrayListWithCapacity(response.getZonesCount());
for (EncryptionZoneProto p : response.getZonesList()) {
elements.add(PBHelperClient.convert(p));
}
return new BatchedListEntries<>(elements, response.getHasMore());
} catch (ServiceException e) {
throw ProtobufHelper.getRemoteException(e);
}
}
Aggregations