Condividi tramite


IFileSystemOperations.AppendWithHttpMessagesAsync Method

Definition

Used for serial appends to the specified file. NOTE: The target must not contain data added by ConcurrentAppend. ConcurrentAppend and Append cannot be used interchangeably; once a target file has been modified using either of these append options, the other append option cannot be used on the target file.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> AppendWithHttpMessagesAsync (string accountName, string directFilePath, System.IO.Stream streamContents, long? offset = default, Microsoft.Azure.Management.DataLake.Store.Models.SyncFlag? syncFlag = default, Guid? leaseId = default, Guid? fileSessionId = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> AppendWithHttpMessagesAsync (string accountName, string path, System.IO.Stream streamContents, long? offset = default, Microsoft.Azure.Management.DataLake.Store.Models.SyncFlag? syncFlag = default, Guid? leaseId = default, Guid? fileSessionId = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AppendWithHttpMessagesAsync : string * string * System.IO.Stream * Nullable<int64> * Nullable<Microsoft.Azure.Management.DataLake.Store.Models.SyncFlag> * Nullable<Guid> * Nullable<Guid> * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse>
abstract member AppendWithHttpMessagesAsync : string * string * System.IO.Stream * Nullable<int64> * Nullable<Microsoft.Azure.Management.DataLake.Store.Models.SyncFlag> * Nullable<Guid> * Nullable<Guid> * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse>
Public Function AppendWithHttpMessagesAsync (accountName As String, directFilePath As String, streamContents As Stream, Optional offset As Nullable(Of Long) = Nothing, Optional syncFlag As Nullable(Of SyncFlag) = Nothing, Optional leaseId As Nullable(Of Guid) = Nothing, Optional fileSessionId As Nullable(Of Guid) = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse)
Public Function AppendWithHttpMessagesAsync (accountName As String, path As String, streamContents As Stream, Optional offset As Nullable(Of Long) = Nothing, Optional syncFlag As Nullable(Of SyncFlag) = Nothing, Optional leaseId As Nullable(Of Guid) = Nothing, Optional fileSessionId As Nullable(Of Guid) = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse)

Parameters

accountName
String

The Azure Data Lake Store account to execute filesystem operations on.

directFilePathpath
String

The Data Lake Store path (starting with '/') of the file to which to append.

streamContents
Stream

The file contents to include when appending to the file.

offset
Nullable<Int64>

The optional offset in the stream to begin the append operation. Default is to append at the end of the stream.

syncFlag
Nullable<SyncFlag>

Optionally indicates what to do after completion of the concurrent append. DATA indicates that more data will be sent immediately by the client, the file handle should remain open/locked, and file metadata (including file length, last modified time) should NOT get updated. METADATA indicates that more data will be sent immediately by the client, the file handle should remain open/locked, and file metadata should get updated. CLOSE indicates that the client is done sending data, the file handle should be closed/unlocked, and file metadata should get updated. Possible values include: 'DATA', 'METADATA', 'CLOSE'

leaseId
Nullable<Guid>

Optional unique GUID per file to ensure single writer semantics, meaning that only clients that append to the file with the same leaseId will be allowed to do so.

fileSessionId
Nullable<Guid>

Optional unique GUID per file indicating all the appends with the same fileSessionId are from the same client and same session. This will give a performance benefit when syncFlag is DATA or METADATA.

customHeaders
Dictionary<String,List<String>>

The headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Exceptions

Thrown when the operation returned an invalid status code

Thrown when a required parameter is null

Applies to