DataLakeFileClient.FlushAsync Method

Definition

The FlushAsync(Int64, DataLakeFileFlushOptions, CancellationToken) operation flushes (writes) previously appended data to a file.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>> FlushAsync (long position, Azure.Storage.Files.DataLake.Models.DataLakeFileFlushOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member FlushAsync : int64 * Azure.Storage.Files.DataLake.Models.DataLakeFileFlushOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>>
override this.FlushAsync : int64 * Azure.Storage.Files.DataLake.Models.DataLakeFileFlushOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>>
Public Overridable Function FlushAsync (position As Long, Optional options As DataLakeFileFlushOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of PathInfo))

Parameters

position
Int64

This parameter allows the caller to upload data in parallel and control the order in which it is appended to the file. It is required when uploading data to be appended to the file and when flushing previously uploaded data to the file. The value must be the position where the data is to be appended. Uploaded data is not immediately flushed, or written, to the file. To flush, the previously uploaded data must be contiguous, the position parameter must be specified and equal to the length of the file after all data has been written, and there must not be a request entity body included with the request.

options
DataLakeFileFlushOptions

Optional parameters.

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

A Response<T> describing the path.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to