CloudBlob.DownloadToFileParallelAsync メソッド

定義

オーバーロード

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

並列要求を行って BLOB の内容をファイルにダウンロードする非同期操作を開始します。

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

並列要求を行って BLOB の内容をファイルにダウンロードする非同期操作を開始します。

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

並列要求を行って BLOB の内容をファイルにダウンロードする非同期操作を開始します。

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

並列要求を行って BLOB の内容をファイルにダウンロードする非同期操作を開始します。

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

パラメーター

path
String

ターゲット ファイルへのパスを含む文字列。

mode
FileMode

FileModeファイルを開くか作成する方法を決定する列挙値。

parallelIOCount
Int32

同時にダウンロードできる範囲の最大数

rangeSizeInBytes
Nullable<Int64>

並列で読み込まれる個々の範囲のサイズ (バイト単位)。 範囲のサイズは、4 KB の倍数と 4 MB 以上である必要があります。 値が渡されない場合は、トランザクション MD5 が有効になっている場合は既定値の 16 MB または 4 MB。

offset
Int64

BLOB のオフセット。

length
Nullable<Int64>

ダウンロードするバイト数。

accessCondition
AccessCondition

要求を実行するために満たす必要のある条件を表す AccessCondition オブジェクトです。

options
BlobRequestOptions

要求の追加オプションを指定する BlobRequestOptions オブジェクトです。

operationContext
OperationContext

現在の操作のコンテキストを表す OperationContext オブジェクトです。

cancellationToken
CancellationToken

タスクの完了を待機しているときに監視する CancellationToken

戻り値

非同期操作を表す Task オブジェクト。

属性

注釈

parallelIOCount と rangeSizeInBytes は、CPU、メモリ、帯域幅に応じて調整する必要があります。 この API は、データをダウンロードする前にHEAD要求が行われるので、より大きなダウンロードにのみ使用する必要があります。 小さい BLOB の場合は、DownloadToFileAsync() を使用してください。 最適なパフォーマンスを得るには、いくつかの値を試してスループットを測定することをお勧めします。 開始する 1 つの場所は、parallelIOCount を CPU の数に設定することです。 次に、rangeSizeInBytes を調整して、parallelIOCount が rangeSizeInBytes を処理に使用するメモリの量と等しくなるようにします。

適用対象

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

並列要求を行って BLOB の内容をファイルにダウンロードする非同期操作を開始します。

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task DownloadToFileParallelAsync (string path, System.IO.FileMode mode, int parallelIOCount, long? rangeSizeInBytes, System.Threading.CancellationToken cancellationToken);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
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
Public Overridable Function DownloadToFileParallelAsync (path As String, mode As FileMode, parallelIOCount As Integer, rangeSizeInBytes As Nullable(Of Long), cancellationToken As CancellationToken) As Task

パラメーター

path
String

ターゲット ファイルへのパスを含む文字列。

mode
FileMode

FileModeファイルを開くか作成する方法を決定する列挙値。

parallelIOCount
Int32

同時にダウンロードできる範囲の最大数。

rangeSizeInBytes
Nullable<Int64>

並列で読み込まれる個々の範囲のサイズ (バイト単位)。 範囲のサイズは、4 KB の倍数と 4 MB 以上である必要があります。 値が渡されない場合は、既定値の 16 MB が使用され、トランザクション MD5 が有効になっている場合は 4 MB が使用されます。

cancellationToken
CancellationToken

タスクの完了を待機しているときに監視する CancellationToken

戻り値

非同期操作を表す Task オブジェクト。

属性


// When calling the DownloadToFileParallelAsync API,
// the parallelIOCount variable represents how many ranges can be downloaded concurrently. If the
// parallel I/O count reaches this threshold, no more further requests are made until one range completes.
// The rangeSizeInBytes represents the size of each individual range that is being dowloaded in parallel.
// Passing a cancellation token is advised since for certain network errors, this code will continue to retry indefintitely.
int parallelIOCount = 16;
long rangeSizeInBytes = 16*Constants.MB;
CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
await blob.DownloadToFileParallelAsync(outputFileName, FileMode.Create, parallelIOCount, rangeSizeInBytes, cancellationTokenSource.Token);

注釈

parallelIOCount と rangeSizeInBytes は、CPU、メモリ、帯域幅に応じて調整する必要があります。 この API は、データをダウンロードする前にHEAD要求が行われるので、より大きなダウンロードにのみ使用する必要があります。 小さい BLOB の場合は、DownloadToFileAsync() を使用してください。 最適なパフォーマンスを得るには、いくつかの値を試してスループットを測定することをお勧めします。 開始する 1 つの場所は、parallelIOCount を CPU の数に設定することです。 次に、rangeSizeInBytes を調整して、parallelIOCount が rangeSizeInBytes を処理に使用するメモリの量と等しくなるようにします。

適用対象

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

並列要求を行って BLOB の内容をファイルにダウンロードする非同期操作を開始します。

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task DownloadToFileParallelAsync (string path, System.IO.FileMode mode, int parallelIOCount, long? rangeSizeInBytes);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
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

パラメーター

path
String

ターゲット ファイルへのパスを含む文字列。

mode
FileMode

FileModeファイルを開くか作成する方法を決定する列挙値。

parallelIOCount
Int32

同時にダウンロードできる範囲の最大数

rangeSizeInBytes
Nullable<Int64>

並列で読み込まれる個々の範囲のサイズ (バイト単位)。 範囲のサイズは、4 KB の倍数と 4 MB 以上である必要があります。 値が渡されない場合は、既定値の 16 MB が使用され、トランザクション MD5 が有効になっている場合は 4 MB が使用されます。

戻り値

非同期操作を表す Task オブジェクト。

属性

注釈

parallelIOCount と rangeSizeInBytes は、CPU、メモリ、帯域幅に応じて調整する必要があります。 この API は、データをダウンロードする前にHEAD要求が行われるので、より大きなダウンロードにのみ使用する必要があります。 小さい BLOB の場合は、DownloadToFileAsync() を使用してください。 最適なパフォーマンスを得るには、いくつかの値を試してスループットを測定することをお勧めします。 開始する 1 つの場所は、parallelIOCount を CPU の数に設定することです。 次に、rangeSizeInBytes を調整して、parallelIOCount が rangeSizeInBytes を処理に使用するメモリの量と等しくなるようにします。

適用対象