tkaymak commented on a change in pull request #5685: [AIRFLOW-5072] gcs_hook's
download() method should download only once
URL: https://github.com/apache/airflow/pull/5685#discussion_r313253415
##########
File path: airflow/contrib/hooks/gcs_hook.py
##########
@@ -172,8 +172,9 @@ def download(self, bucket_name, object_name,
filename=None):
if filename:
blob.download_to_filename(filename)
self.log.info('File downloaded to %s', filename)
-
- return blob.download_as_string()
+ return filename
Review comment:
@mik-laj that is breaking the whole thing as when the blob is huge it eats
up all the memory and crashes.
As a user when I supply a filename to download to a file I don't want the
content of that file being passed back to me. My expectation is that it's
written to that filename and done with it.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services