From 27c2401f596d99a2dc2d5f5ba9c7482effe35bed Mon Sep 17 00:00:00 2001 From: Batuhan Taskaya Date: Mon, 22 Feb 2021 15:08:26 +0300 Subject: [PATCH] azure: transfer bigger chunks of data (#5504) --- dvc/fs/azure.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dvc/fs/azure.py b/dvc/fs/azure.py index fddbc9395..46cbf9999 100644 --- a/dvc/fs/azure.py +++ b/dvc/fs/azure.py @@ -177,8 +177,12 @@ class AzureFileSystem(BaseFileSystem): return info def _upload_fobj(self, fobj, to_info): + from adlfs import AzureBlobFile + with self.open(to_info, "wb") as fdest: - shutil.copyfileobj(fobj, fdest) + shutil.copyfileobj( + fobj, fdest, length=AzureBlobFile.DEFAULT_BLOCK_SIZE + ) def _upload( self, from_file, to_info, name=None, no_progress_bar=False, **kwargs