Class PutTracker

java.lang.Object
org.apache.hadoop.fs.s3a.commit.PutTracker
Direct Known Subclasses:
MagicCommitTracker

@Private public class PutTracker extends Object
Multipart put tracker. Base class does nothing except declare that any MPU must complete in the close() operation.
  • Constructor Details

    • PutTracker

      public PutTracker(String destKey)
      Instantiate.
      Parameters:
      destKey - destination key
  • Method Details

    • initialize

      public boolean initialize() throws IOException
      Startup event.
      Returns:
      true if the multipart should start immediately.
      Throws:
      IOException - any IO problem.
    • outputImmediatelyVisible

      public boolean outputImmediatelyVisible()
      Flag to indicate that output is not immediately visible after the stream is closed. Default: false.
      Returns:
      true if the output's visibility will be delayed.
    • aboutToComplete

      public boolean aboutToComplete(String uploadId, List<software.amazon.awssdk.services.s3.model.CompletedPart> parts, long bytesWritten, org.apache.hadoop.fs.statistics.IOStatistics iostatistics) throws IOException
      Callback when the upload is is about to complete.
      Parameters:
      uploadId - Upload ID
      parts - list of parts
      bytesWritten - bytes written
      iostatistics - nullable IO statistics
      Returns:
      true if the commit is to be initiated immediately. False implies the output stream does not need to worry about what happens.
      Throws:
      IOException - I/O problem or validation failure.
    • getDestKey

      public String getDestKey()
      get the destination key. The default implementation returns the key passed in: there is no adjustment of the destination.
      Returns:
      the destination to use in PUT requests.
    • toString

      public String toString()
      Overrides:
      toString in class Object