adamdebreceni commented on a change in pull request #1221: URL: https://github.com/apache/nifi-minifi-cpp/pull/1221#discussion_r767837675
########## File path: extensions/azure/storage/AzureDataLakeStorage.cpp ########## @@ -61,4 +61,29 @@ bool AzureDataLakeStorage::deleteFile(const storage::DeleteAzureDataLakeStorageP } } +std::optional<uint64_t> AzureDataLakeStorage::fetchFile(const FetchAzureDataLakeStorageParameters& params, io::BaseStream& stream) { + try { + auto fetch_res = data_lake_storage_client_->fetchFile(params); + + std::vector<uint8_t> buffer(4096); + size_t write_size = 0; + if (fetch_res.FileSize < 0) return 0; + while (write_size < gsl::narrow<uint64_t>(fetch_res.FileSize)) { + const auto next_write_size = (std::min)(gsl::narrow<size_t>(fetch_res.FileSize) - write_size, size_t{4096}); Review comment: `buffer.size()` could be used here -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org