public class DataCacheWriter<T> extends Object
Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
void |
addRecord(T record) |
void |
clear()
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.
|
void |
writeSegmentsToFiles()
Write the segments in this writer to files on disk.
|
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
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
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
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
public void addRecord(T record) throws IOException
IOException
public List<Segment> finish() throws IOException
IOException
public List<Segment> getSegments() throws IOException
IOException
public void clear() throws IOException
IOException
public void writeSegmentsToFiles() throws IOException
IOException
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.