Class DataLakeFileFlushOptions

java.lang.Object
com.azure.storage.file.datalake.options.DataLakeFileFlushOptions

public class DataLakeFileFlushOptions extends Object
Optional parameters for appending data to a file when calling flush() on DataLakeFileClient and DataLakeFileAsyncClient
  • Constructor Details

  • Method Details

    • 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:
      whether to retain uncommitted data.
    • 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:
      retainUncommittedData - boolean flag to indicate whether uncommitted data should be retained.
      Returns:
      the updated DataLakeFileFlushOptions object.
    • 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:
      whether the file stream has been closed.
    • 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:
      close - boolean flag to indicate whether file stream has been closed.
      Returns:
      the updated DataLakeFileFlushOptions object.
    • getPathHttpHeaders

      public PathHttpHeaders getPathHttpHeaders()
      Optional standard HTTP header properties for the file.
      Returns:
      the PathHttpHeaders for this file.
    • setPathHttpHeaders

      public DataLakeFileFlushOptions setPathHttpHeaders(PathHttpHeaders pathHttpHeaders)
      Optional standard HTTP header properties that can be set for the file.
      Parameters:
      pathHttpHeaders - PathHttpHeaders to be set for this file.
      Returns:
      the updated DataLakeFileFlushOptions object.
    • getRequestConditions

      public DataLakeRequestConditions getRequestConditions()
      Optional DataLakeRequestConditions conditions that are set on the flush of this file.
      Returns:
      DataLakeRequestConditions for this file.
    • setRequestConditions

      public DataLakeFileFlushOptions setRequestConditions(DataLakeRequestConditions requestConditions)
      Optional DataLakeRequestConditions conditions to add on the flush of this file.
      Parameters:
      requestConditions - DataLakeRequestConditions to set on this file.
      Returns:
      the updated DataLakeFileFlushOptions object.
    • getLeaseAction

      public LeaseAction getLeaseAction()
      Get lease action set on file. LeaseAction.ACQUIRE will attempt to acquire a new lease on the file, with proposedLeaseId as the lease ID. LeaseAction.ACQUIRE_RELEASE will attempt to acquire a new lease on the file, with proposedLeaseId as the lease ID. The lease will be released once the Append operation is complete. LeaseAction.AUTO_RENEW will attempt to renew the lease specified by DataLakeRequestConditions.getLeaseId(). LeaseAction.RELEASE will attempt to release the least specified by DataLakeRequestConditions.getLeaseId().
      Returns:
      The LeaseAction set on the file.
    • setLeaseAction

      public DataLakeFileFlushOptions setLeaseAction(LeaseAction leaseAction)
      Get lease action set on file. LeaseAction.ACQUIRE will attempt to acquire a new lease on the file, with proposedLeaseId as the lease ID. LeaseAction.ACQUIRE_RELEASE will attempt to acquire a new lease on the file, with proposedLeaseId as the lease ID. The lease will be released once the Append operation is complete. LeaseAction.AUTO_RENEW will attempt to renew the lease specified by DataLakeRequestConditions.getLeaseId(). LeaseAction.RELEASE will attempt to release the least specified by DataLakeRequestConditions.getLeaseId().
      Parameters:
      leaseAction - the LeaseAction to set on the file.
      Returns:
      the updated DataLakeFileFlushOptions object.
    • getLeaseDuration

      public Integer getLeaseDuration()
      Gets the lease duration in seconds.
      Returns:
      the lease duration in seconds.
    • 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:
      leaseDurationInSeconds - the new lease duration.
      Returns:
      the updated DataLakeFileFlushOptions object.
    • getProposedLeaseId

      public String getProposedLeaseId()
      Gets proposed lease id. Valid with LeaseAction.ACQUIRE and LeaseAction.ACQUIRE_RELEASE.
      Returns:
      the proposed lease id.
    • setProposedLeaseId

      public DataLakeFileFlushOptions setProposedLeaseId(String proposedLeaseId)
      Sets the proposed lease id. Valid with LeaseAction.ACQUIRE and LeaseAction.ACQUIRE_RELEASE.
      Parameters:
      proposedLeaseId - the proposed lease id to set.
      Returns:
      the updated DataLakeFileFlushOptions object.