CloudBlob.DownloadToFileParallelAsync CloudBlob.DownloadToFileParallelAsync CloudBlob.DownloadToFileParallelAsync Method

Definition

Overloads

DownloadToFileParallelAsync(String, FileMode, Int32, Nullable<Int64>) DownloadToFileParallelAsync(String, FileMode, Int32, Nullable<Int64>) DownloadToFileParallelAsync(String, FileMode, Int32, Nullable<Int64>)

Initiates an asynchronous operation to download the contents of a blob to a file by making parallel requests.

DownloadToFileParallelAsync(String, FileMode, Int32, Nullable<Int64>, CancellationToken) DownloadToFileParallelAsync(String, FileMode, Int32, Nullable<Int64>, CancellationToken)

Initiates an asynchronous operation to download the contents of a blob to a file by making parallel requests.

DownloadToFileParallelAsync(String, FileMode, Int32, Nullable<Int64>, Int64, Nullable<Int64>, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) DownloadToFileParallelAsync(String, FileMode, Int32, Nullable<Int64>, Int64, Nullable<Int64>, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to download the contents of a blob to a file by making parallel requests.

DownloadToFileParallelAsync(String, FileMode, Int32, Nullable<Int64>) DownloadToFileParallelAsync(String, FileMode, Int32, Nullable<Int64>) DownloadToFileParallelAsync(String, FileMode, Int32, Nullable<Int64>)

Initiates an asynchronous operation to download the contents of a blob to a file by making parallel requests.

[Microsoft.WindowsAzure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task DownloadToFileParallelAsync (string path, System.IO.FileMode mode, int parallelIOCount, Nullable<long> rangeSizeInBytes);
abstract member DownloadToFileParallelAsync : string * System.IO.FileMode * int * Nullable<int64> -> System.Threading.Tasks.Task
override this.DownloadToFileParallelAsync : string * System.IO.FileMode * int * Nullable<int64> -> System.Threading.Tasks.Task
Public Overridable Function DownloadToFileParallelAsync (path As String, mode As FileMode, parallelIOCount As Integer, rangeSizeInBytes As Nullable(Of Long)) As Task
Parameters
path
String String String

A string containing the path to the target file.

mode
FileMode FileMode FileMode

A FileMode enumeration value that determines how to open or create the file.

parallelIOCount
Int32 Int32 Int32

The maximum number of ranges that can be downloaded concurrently

rangeSizeInBytes
Nullable<Int64>

The size of each individual range in bytes that is being dowloaded in parallel. The range size must be a multiple of 4 KB and a minimum of 4 MB. If no value is passed a default value of 16 MB is used or 4MB if transactional MD5 is enabled.

Returns

A Task object that represents the asynchronous operation.

Remarks

The parallelIOCount and rangeSizeInBytes should be adjusted depending on the CPU, memory, and bandwidth.
This API should only be used for larger downloads as a HEAD request is made prior to downloading the data.
For smaller blobs, please use DownloadToFileAsync().
To get the best performance, it is recommended to try several values, and measure throughput.
One place to start would be to set the parallelIOCount to the number of CPUs.
Then adjust the rangeSizeInBytes so that parallelIOCount times rangeSizeInBytes equals the amount of memory you want the process to consume.

DownloadToFileParallelAsync(String, FileMode, Int32, Nullable<Int64>, CancellationToken) DownloadToFileParallelAsync(String, FileMode, Int32, Nullable<Int64>, CancellationToken)

Initiates an asynchronous operation to download the contents of a blob to a file by making parallel requests.

[Microsoft.WindowsAzure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task DownloadToFileParallelAsync (string path, System.IO.FileMode mode, int parallelIOCount, Nullable<long> rangeSizeInBytes, System.Threading.CancellationToken cancellationToken);
abstract member DownloadToFileParallelAsync : string * System.IO.FileMode * int * Nullable<int64> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.DownloadToFileParallelAsync : string * System.IO.FileMode * int * Nullable<int64> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Parameters
path
String String String

A string containing the path to the target file.

mode
FileMode FileMode FileMode

A FileMode enumeration value that determines how to open or create the file.

parallelIOCount
Int32 Int32 Int32

The maximum number of ranges that can be downloaded concurrently.

rangeSizeInBytes
Nullable<Int64>

The size of each individual range in bytes that is being dowloaded in parallel. The range size must be a multiple of 4 KB and a minimum of 4 MB. If no value is passed a default value of 16 MB is used or 4MB if transactional MD5 is enabled.

cancellationToken
CancellationToken CancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

A Task object that represents the asynchronous operation.

Remarks

The parallelIOCount and rangeSizeInBytes should be adjusted depending on the CPU, memory, and bandwidth.
This API should only be used for larger downloads as a HEAD request is made prior to downloading the data.
For smaller blobs, please use DownloadToFileAsync().
To get the best performance, it is recommended to try several values, and measure throughput.
One place to start would be to set the parallelIOCount to the number of CPUs.
Then adjust the rangeSizeInBytes so that parallelIOCount times rangeSizeInBytes equals the amount of memory you want the process to consume.

DownloadToFileParallelAsync(String, FileMode, Int32, Nullable<Int64>, Int64, Nullable<Int64>, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) DownloadToFileParallelAsync(String, FileMode, Int32, Nullable<Int64>, Int64, Nullable<Int64>, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to download the contents of a blob to a file by making parallel requests.

[Microsoft.WindowsAzure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task DownloadToFileParallelAsync (string path, System.IO.FileMode mode, int parallelIOCount, Nullable<long> rangeSizeInBytes, long offset, Nullable<long> length, Microsoft.WindowsAzure.Storage.AccessCondition accessCondition, Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions options, Microsoft.WindowsAzure.Storage.OperationContext operationContext, System.Threading.CancellationToken cancellationToken);
abstract member DownloadToFileParallelAsync : string * System.IO.FileMode * int * Nullable<int64> * int64 * Nullable<int64> * Microsoft.WindowsAzure.Storage.AccessCondition * Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions * Microsoft.WindowsAzure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.DownloadToFileParallelAsync : string * System.IO.FileMode * int * Nullable<int64> * int64 * Nullable<int64> * Microsoft.WindowsAzure.Storage.AccessCondition * Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions * Microsoft.WindowsAzure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Parameters
path
String String String

A string containing the path to the target file.

mode
FileMode FileMode FileMode

A FileMode enumeration value that determines how to open or create the file.

parallelIOCount
Int32 Int32 Int32

The maximum number of ranges that can be downloaded concurrently

rangeSizeInBytes
Nullable<Int64>

The size of each individual range in bytes that is being dowloaded in parallel. The range size must be a multiple of 4 KB and a minimum of 4 MB. If no value is passed a default value of 16 MB or 4MB if transactional MD5 is enabled.

offset
Int64 Int64 Int64

The offset of the blob.

length
Nullable<Int64>

The number of bytes to download.

accessCondition
AccessCondition AccessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options
BlobRequestOptions BlobRequestOptions BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext
OperationContext OperationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken
CancellationToken CancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

A Task object that represents the asynchronous operation.

Remarks

The parallelIOCount and rangeSizeInBytes should be adjusted depending on the CPU, memory, and bandwidth.
This API should only be used for larger downloads as a HEAD request is made prior to downloading the data.
For smaller blobs, please use DownloadToFileAsync().
To get the best performance, it is recommended to try several values, and measure throughput.
One place to start would be to set the parallelIOCount to the number of CPUs.
Then adjust the rangeSizeInBytes so that parallelIOCount times rangeSizeInBytes equals the amount of memory you want the process to consume.

Applies to