类 DataCacheWriter<T>
- java.lang.Object
-
- org.apache.flink.iteration.datacache.nonkeyed.DataCacheWriter<T>
-
public class DataCacheWriter<T> extends Object
Records the data received and replayed them when required.
-
-
构造器概要
构造器 构造器 说明 DataCacheWriter(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer, org.apache.flink.core.fs.FileSystem fileSystem, org.apache.flink.util.function.SupplierWithException<org.apache.flink.core.fs.Path,IOException> pathGenerator)DataCacheWriter(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer, org.apache.flink.core.fs.FileSystem fileSystem, org.apache.flink.util.function.SupplierWithException<org.apache.flink.core.fs.Path,IOException> pathGenerator, List<Segment> priorFinishedSegments)DataCacheWriter(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer, org.apache.flink.core.fs.FileSystem fileSystem, org.apache.flink.util.function.SupplierWithException<org.apache.flink.core.fs.Path,IOException> pathGenerator, org.apache.flink.table.runtime.util.MemorySegmentPool segmentPool)DataCacheWriter(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer, org.apache.flink.core.fs.FileSystem fileSystem, org.apache.flink.util.function.SupplierWithException<org.apache.flink.core.fs.Path,IOException> pathGenerator, org.apache.flink.table.runtime.util.MemorySegmentPool segmentPool, List<Segment> priorFinishedSegments)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddRecord(T record)voidclear()Removes all previously added records.List<Segment>finish()Finishes adding records and closes resources occupied for adding records.List<Segment>getSegments()Flushes all added records to segments and returns a list of segments containing all cached records.voidwriteSegmentsToFiles()Write the segments in this writer to files on disk.
-
-
-
构造器详细资料
-
DataCacheWriter
public DataCacheWriter(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer, org.apache.flink.core.fs.FileSystem fileSystem, org.apache.flink.util.function.SupplierWithException<org.apache.flink.core.fs.Path,IOException> pathGenerator) throws IOException
- 抛出:
IOException
-
DataCacheWriter
public DataCacheWriter(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer, org.apache.flink.core.fs.FileSystem fileSystem, org.apache.flink.util.function.SupplierWithException<org.apache.flink.core.fs.Path,IOException> pathGenerator, org.apache.flink.table.runtime.util.MemorySegmentPool segmentPool) throws IOException
- 抛出:
IOException
-
DataCacheWriter
public DataCacheWriter(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer, org.apache.flink.core.fs.FileSystem fileSystem, org.apache.flink.util.function.SupplierWithException<org.apache.flink.core.fs.Path,IOException> pathGenerator, List<Segment> priorFinishedSegments) throws IOException
- 抛出:
IOException
-
DataCacheWriter
public DataCacheWriter(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer, org.apache.flink.core.fs.FileSystem fileSystem, org.apache.flink.util.function.SupplierWithException<org.apache.flink.core.fs.Path,IOException> pathGenerator, @Nullable org.apache.flink.table.runtime.util.MemorySegmentPool segmentPool, List<Segment> priorFinishedSegments) throws IOException
- 抛出:
IOException
-
-
方法详细资料
-
addRecord
public void addRecord(T record) throws IOException
- 抛出:
IOException
-
finish
public List<Segment> finish() throws IOException
Finishes adding records and closes resources occupied for adding records.- 抛出:
IOException
-
getSegments
public List<Segment> getSegments() throws IOException
Flushes all added records to segments and returns a list of segments containing all cached records.- 抛出:
IOException
-
clear
public void clear() throws IOExceptionRemoves all previously added records.- 抛出:
IOException
-
writeSegmentsToFiles
public void writeSegmentsToFiles() throws IOExceptionWrite the segments in this writer to files on disk.- 抛出:
IOException
-
-