DataLakeFileFlushOptions Class
- java.
lang. Object - com.
azure. storage. file. datalake. options. DataLakeFileFlushOptions
- com.
public class DataLakeFileFlushOptions
Optional parameters for appending data to a file when calling flush() on DataLakeFileClient and DataLakeFileAsyncClient
Constructor Summary
Constructor | Description | |
---|---|---|
DataLakeFileFlushOptions() |
Method Summary
Modifier and Type | Method and Description |
---|---|
Lease |
getLeaseAction()
Get lease action set on file. |
Integer | getLeaseDuration() |
Path |
getPathHttpHeaders()
Optional standard HTTP header properties for the file. |
String |
getProposedLeaseId()
Gets proposed lease id. |
Data |
getRequestConditions()
Optional DataLakeRequestConditions conditions that are set on the flush of this file. |
Boolean |
isClose()
Azure Storage Events allow applications to receive notifications when files change. |
Boolean |
isUncommittedDataRetained()
If "true", uncommitted data is retained after the flush operation completes; otherwise, the uncommitted data is deleted after the flush operation. |
Data |
setClose(Boolean close)
Sets whether file stream has been closed. |
Data |
setLeaseAction(LeaseAction leaseAction)
Get lease action set on file. |
Data |
setLeaseDuration(Integer leaseDurationInSeconds)
Sets the lease duration. |
Data |
setPathHttpHeaders(PathHttpHeaders pathHttpHeaders)
Optional standard HTTP header properties that can be set for the file. |
Data |
setProposedLeaseId(String proposedLeaseId)
Sets the proposed lease id. |
Data |
setRequestConditions(DataLakeRequestConditions requestConditions)
Optional DataLakeRequestConditions conditions to add on the flush of this file. |
Data |
setUncommittedDataRetained(Boolean retainUncommittedData)
Sets whether uncommitted data should be retained. |
Methods inherited from java.lang.Object
Constructor Details
DataLakeFileFlushOptions
public DataLakeFileFlushOptions()
Method Details
getLeaseAction
public LeaseAction getLeaseAction()
Get lease action set on file. ACQUIRE will attempt to acquire a new lease on the file, with DataLakeFileFlushOptions#proposedLeaseId as the lease ID. ACQUIRE_RELEASE will attempt to acquire a new lease on the file, with DataLakeFileFlushOptions#proposedLeaseId as the lease ID. The lease will be released once the Append operation is complete. AUTO_RENEW will attempt to renew the lease specified by getLeaseId(). RELEASE will attempt to release the least specified by getLeaseId().
Returns:
getLeaseDuration
public Integer getLeaseDuration()
Returns:
getPathHttpHeaders
public PathHttpHeaders getPathHttpHeaders()
Optional standard HTTP header properties for the file.
Returns:
getProposedLeaseId
public String getProposedLeaseId()
Gets proposed lease id. Valid with ACQUIRE and ACQUIRE_RELEASE.
Returns:
getRequestConditions
public DataLakeRequestConditions getRequestConditions()
Optional DataLakeRequestConditions conditions that are set on the flush of this file.
Returns:
isClose
public Boolean isClose()
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.
Returns:
isUncommittedDataRetained
public Boolean isUncommittedDataRetained()
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.
Returns:
setClose
public DataLakeFileFlushOptions setClose(Boolean close)
Sets whether file stream has been closed. 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.
Parameters:
Returns:
setLeaseAction
public DataLakeFileFlushOptions setLeaseAction(LeaseAction leaseAction)
Get lease action set on file. ACQUIRE will attempt to acquire a new lease on the file, with DataLakeFileFlushOptions#proposedLeaseId as the lease ID. ACQUIRE_RELEASE will attempt to acquire a new lease on the file, with DataLakeFileFlushOptions#proposedLeaseId as the lease ID. The lease will be released once the Append operation is complete. AUTO_RENEW will attempt to renew the lease specified by getLeaseId(). RELEASE will attempt to release the least specified by getLeaseId().
Parameters:
Returns:
setLeaseDuration
public DataLakeFileFlushOptions setLeaseDuration(Integer leaseDurationInSeconds)
Sets the lease duration. Optional. Specifies the duration of the lease, in seconds, or specify -1 for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds.
Parameters:
Returns:
setPathHttpHeaders
public DataLakeFileFlushOptions setPathHttpHeaders(PathHttpHeaders pathHttpHeaders)
Optional standard HTTP header properties that can be set for the file.
Parameters:
Returns:
setProposedLeaseId
public DataLakeFileFlushOptions setProposedLeaseId(String proposedLeaseId)
Sets the proposed lease id. Valid with ACQUIRE and ACQUIRE_RELEASE.
Parameters:
Returns:
setRequestConditions
public DataLakeFileFlushOptions setRequestConditions(DataLakeRequestConditions requestConditions)
Optional DataLakeRequestConditions conditions to add on the flush of this file.
Parameters:
Returns:
setUncommittedDataRetained
public DataLakeFileFlushOptions setUncommittedDataRetained(Boolean retainUncommittedData)
Sets whether uncommitted data should be retained. 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.
Parameters:
Returns: