From 69fdd9736b9ccb37ff8bc5a87643b0394b1c227c Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Tue, 31 Dec 2024 17:10:19 +0530 Subject: [PATCH] reduce diff --- libs/filer/dbfs_client.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/filer/dbfs_client.go b/libs/filer/dbfs_client.go index 5fefd13c6..b09012ca9 100644 --- a/libs/filer/dbfs_client.go +++ b/libs/filer/dbfs_client.go @@ -143,6 +143,11 @@ func (w *DbfsClient) putFile(ctx context.Context, path string, overwrite bool, f return err } +// MaxUploadLimitForPutApi is the maximum size in bytes of a file that can be uploaded +// using the /dbfs/put API. If the file is larger than this limit, the streaming +// API (/dbfs/create and /dbfs/add-block) will be used instead. +var MaxDbfsPutFileSize int64 = 2 * 1024 * 1024 * 1024 + func (w *DbfsClient) streamFile(ctx context.Context, path string, overwrite bool, reader io.Reader) error { fileMode := files.FileModeWrite if overwrite { @@ -174,11 +179,6 @@ func (w *DbfsClient) streamFile(ctx context.Context, path string, overwrite bool return err } -// MaxUploadLimitForPutApi is the maximum size in bytes of a file that can be uploaded -// using the /dbfs/put API. If the file is larger than this limit, the streaming -// API (/dbfs/create and /dbfs/add-block) will be used instead. -var MaxDbfsPutFileSize int64 = 2 * 1024 * 1024 * 1024 - func (w *DbfsClient) Write(ctx context.Context, name string, reader io.Reader, mode ...WriteMode) error { absPath, err := w.root.Join(name) if err != nil {