Package org.apache.hadoop.fs.s3a.commit
Class PutTracker
java.lang.Object
org.apache.hadoop.fs.s3a.commit.PutTracker
- Direct Known Subclasses:
MagicCommitTracker
Multipart put tracker.
Base class does nothing except declare that any
MPU must complete in the
close() operation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaboutToComplete(String uploadId, List<software.amazon.awssdk.services.s3.model.CompletedPart> parts, long bytesWritten, org.apache.hadoop.fs.statistics.IOStatistics iostatistics) Callback when the upload is is about to complete.get the destination key.booleanStartup event.booleanFlag to indicate that output is not immediately visible after the stream is closed.toString()
-
Constructor Details
-
PutTracker
Instantiate.- Parameters:
destKey- destination key
-
-
Method Details
-
initialize
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 IDparts- list of partsbytesWritten- bytes writteniostatistics- 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
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
-