@Internal public class PrintSinkOutputWriter<IN> extends Object implements Serializable, SinkWriter<IN>
SinkWriter.Context
Constructor and Description |
---|
PrintSinkOutputWriter() |
PrintSinkOutputWriter(boolean stdErr) |
PrintSinkOutputWriter(String sinkIdentifier,
boolean stdErr) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush(boolean endOfInput)
Called on checkpoint or end of input so that the writer to flush all pending data for
at-least-once.
|
void |
open(int subtaskIndex,
int numParallelSubtasks) |
String |
toString() |
void |
write(IN record) |
void |
write(IN element,
SinkWriter.Context context)
Adds an element to the writer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
writeWatermark
public PrintSinkOutputWriter()
public PrintSinkOutputWriter(boolean stdErr)
public PrintSinkOutputWriter(String sinkIdentifier, boolean stdErr)
public void open(int subtaskIndex, int numParallelSubtasks)
public void write(IN record)
public void write(IN element, SinkWriter.Context context) throws IOException, InterruptedException
SinkWriter
write
in interface SinkWriter<IN>
element
- The input recordcontext
- The additional information about the input recordIOException
- if fail to add an element.InterruptedException
public void flush(boolean endOfInput) throws IOException, InterruptedException
SinkWriter
flush
in interface SinkWriter<IN>
IOException
InterruptedException
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.