Class AbstractPartFileWriter<IN,BucketID>
- java.lang.Object
-
- org.apache.flink.streaming.api.functions.sink.filesystem.AbstractPartFileWriter<IN,BucketID>
-
- Type Parameters:
IN
- the element type.BucketID
- the bucket id type.
- All Implemented Interfaces:
CompactingFileWriter
,InProgressFileWriter<IN,BucketID>
,PartFileInfo<BucketID>
,RecordWiseCompactingFileWriter<IN>
- Direct Known Subclasses:
HadoopPathBasedPartFileWriter
,OutputStreamBasedPartFileWriter
public abstract class AbstractPartFileWriter<IN,BucketID> extends Object implements InProgressFileWriter<IN,BucketID>
An abstract writer for the currently open part file in a specificBucket
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.streaming.api.functions.sink.filesystem.CompactingFileWriter
CompactingFileWriter.Type
-
Nested classes/interfaces inherited from interface org.apache.flink.streaming.api.functions.sink.filesystem.InProgressFileWriter
InProgressFileWriter.InProgressFileRecoverable, InProgressFileWriter.PendingFileRecoverable
-
-
Constructor Summary
Constructors Constructor Description AbstractPartFileWriter(BucketID bucketID, long createTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BucketID
getBucketId()
long
getCreationTime()
long
getLastUpdateTime()
protected void
markWrite(long now)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.streaming.api.functions.sink.filesystem.InProgressFileWriter
closeForCommit, dispose, persist, write, write
-
Methods inherited from interface org.apache.flink.streaming.api.functions.sink.filesystem.PartFileInfo
getSize
-
-
-
-
Constructor Detail
-
AbstractPartFileWriter
public AbstractPartFileWriter(BucketID bucketID, long createTime)
-
-
Method Detail
-
getBucketId
public BucketID getBucketId()
- Specified by:
getBucketId
in interfacePartFileInfo<IN>
- Returns:
- The bucket identifier of the current buffer, as returned by the
BucketAssigner.getBucketId(Object, BucketAssigner.Context)
.
-
getCreationTime
public long getCreationTime()
- Specified by:
getCreationTime
in interfacePartFileInfo<IN>
- Returns:
- The creation time (in ms) of the currently open part file.
-
getLastUpdateTime
public long getLastUpdateTime()
- Specified by:
getLastUpdateTime
in interfacePartFileInfo<IN>
- Returns:
- The last time (in ms) the currently open part file was written to.
-
markWrite
protected void markWrite(long now)
-
-