DataLakeFileClient.FlushAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The FlushAsync(Int64, Nullable<Boolean>, Nullable<Boolean>, PathHttpHeaders, DataLakeRequestConditions, 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, bool? retainUncommittedData = default, bool? close = default, Azure.Storage.Files.DataLake.Models.PathHttpHeaders httpHeaders = default, Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions conditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member FlushAsync : int64 * Nullable<bool> * Nullable<bool> * Azure.Storage.Files.DataLake.Models.PathHttpHeaders * Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>>
override this.FlushAsync : int64 * Nullable<bool> * Nullable<bool> * Azure.Storage.Files.DataLake.Models.PathHttpHeaders * Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>>
Public Overridable Function FlushAsync (position As Long, Optional retainUncommittedData As Nullable(Of Boolean) = Nothing, Optional close As Nullable(Of Boolean) = Nothing, Optional httpHeaders As PathHttpHeaders = Nothing, Optional conditions As DataLakeRequestConditions = 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.
If "true", uncommitted data is retained after the flush operation completes; otherwise, the uncommitted data is deleted after the flush operation. The default is false. Data at offsets less than the specified position are written to the file when flush succeeds, but this optional parameter allows data after the flush position to be retained for a future flush operation.
Azure Storage Events allow applications to receive notifications when files change. When Azure Storage Events are enabled, a file changed event is raised. This event has a property indicating whether this is the final change to distinguish the difference between an intermediate flush to a file stream and the final close of a file stream. The close query parameter is valid only when the action is "flush" and change notifications are enabled. If the value of close is "true" and the flush operation completes successfully, the service raises a file change notification with a property indicating that this is the final update (the file stream has been closed). If "false" a change notification is raised indicating the file has changed. The default is false. This query parameter is set to true by the Hadoop ABFS driver to indicate that the file stream has been closed."
- httpHeaders
- PathHttpHeaders
Optional standard HTTP header properties that can be set for the file.
- conditions
- DataLakeRequestConditions
Optional DataLakeRequestConditions to add conditions on the flush of this file.
- 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
Saran dan Komentar
Kirim dan lihat umpan balik untuk