@InterfaceAudience.Private public class MagicCommitTracker extends PutTracker
Important
: must not directly or indirectly import a class which uses any datatype in hadoop-mapreduce.Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
MagicCommitTracker(org.apache.hadoop.fs.Path path,
String bucket,
String originalDestKey,
String destKey,
String pendingsetKey,
WriteOperationHelper writer,
PutTrackerStatistics trackerStatistics)
Magic commit tracker.
|
Modifier and Type | Method and Description |
---|---|
boolean |
aboutToComplete(String uploadId,
List<software.amazon.awssdk.services.s3.model.CompletedPart> parts,
long bytesWritten,
org.apache.hadoop.fs.statistics.IOStatistics iostatistics)
Complete operation: generate the final commit data, put it.
|
boolean |
initialize()
Initialize the tracker.
|
boolean |
outputImmediatelyVisible()
Flag to indicate that output is not visible after the stream
is closed.
|
String |
toString() |
getDestKey
public MagicCommitTracker(org.apache.hadoop.fs.Path path, String bucket, String originalDestKey, String destKey, String pendingsetKey, WriteOperationHelper writer, PutTrackerStatistics trackerStatistics)
path
- path nominally being written tobucket
- dest bucketoriginalDestKey
- the original key, in the magic directory.destKey
- key for the destinationpendingsetKey
- key of the pendingset filewriter
- writer instance to use for operations; includes audit spantrackerStatistics
- tracker statisticspublic boolean initialize() throws IOException
initialize
in class PutTracker
IOException
- any IO problem.public boolean outputImmediatelyVisible()
outputImmediatelyVisible
in class PutTracker
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
aboutToComplete
in class PutTracker
uploadId
- Upload IDparts
- list of partsbytesWritten
- bytes writteniostatistics
- nullable IO statisticsIOException
- any IO problem.IllegalArgumentException
- bad argumentpublic String toString()
toString
in class PutTracker
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.