use of org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.ListCachePoolsResponseProto in project hadoop by apache.
the class ClientNamenodeProtocolServerSideTranslatorPB method listCachePools.
@Override
public ListCachePoolsResponseProto listCachePools(RpcController controller, ListCachePoolsRequestProto request) throws ServiceException {
try {
BatchedEntries<CachePoolEntry> entries = server.listCachePools(request.getPrevPoolName());
ListCachePoolsResponseProto.Builder responseBuilder = ListCachePoolsResponseProto.newBuilder();
responseBuilder.setHasMore(entries.hasMore());
for (int i = 0, n = entries.size(); i < n; i++) {
responseBuilder.addEntries(PBHelperClient.convert(entries.get(i)));
}
return responseBuilder.build();
} catch (IOException e) {
throw new ServiceException(e);
}
}
Aggregations