T
- The type of elements written.@Internal public class StreamRecordWriter<T extends IOReadableWritable> extends RecordWriter<T>
targetPartition
Constructor and Description |
---|
StreamRecordWriter(ResultPartitionWriter writer,
ChannelSelector<T> channelSelector,
long timeout) |
StreamRecordWriter(ResultPartitionWriter writer,
ChannelSelector<T> channelSelector,
long timeout,
String taskName) |
Modifier and Type | Method and Description |
---|---|
void |
broadcastEmit(T record)
This is used to broadcast Streaming Watermarks in-band with records.
|
void |
close()
Closes the writer.
|
void |
emit(T record) |
void |
randomEmit(T record)
This is used to send LatencyMarks to a random target channel.
|
broadcastEvent, clearBuffers, flushAll, setMetricGroup
public StreamRecordWriter(ResultPartitionWriter writer, ChannelSelector<T> channelSelector, long timeout)
public StreamRecordWriter(ResultPartitionWriter writer, ChannelSelector<T> channelSelector, long timeout, String taskName)
public void emit(T record) throws IOException, InterruptedException
emit
in class RecordWriter<T extends IOReadableWritable>
IOException
InterruptedException
public void broadcastEmit(T record) throws IOException, InterruptedException
RecordWriter
ChannelSelector
.broadcastEmit
in class RecordWriter<T extends IOReadableWritable>
IOException
InterruptedException
public void randomEmit(T record) throws IOException, InterruptedException
RecordWriter
randomEmit
in class RecordWriter<T extends IOReadableWritable>
IOException
InterruptedException
public void close()
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.