T
- Input record type@Deprecated @PublicEvolving public class PrintingOutputFormat<T> extends RichOutputFormat<T>
Four possible format options: sinkIdentifier
:taskId> output <- sinkIdentifier
provided, parallelism > 1 sinkIdentifier
> output <- sinkIdentifier
provided,
parallelism == 1 taskId> output <- no sinkIdentifier
provided, parallelism > 1 output <-
no sinkIdentifier
provided, parallelism == 1
OutputFormat.InitializationContext
Constructor and Description |
---|
PrintingOutputFormat()
Deprecated.
Instantiates a printing output format that prints to standard out.
|
PrintingOutputFormat(boolean stdErr)
Deprecated.
Instantiates a printing output format that prints to standard out.
|
PrintingOutputFormat(String sinkIdentifier,
boolean stdErr)
Deprecated.
Instantiates a printing output format that prints to standard out with a prefixed message.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
Method that marks the end of the life-cycle of parallel output instance.
|
void |
configure(Configuration parameters)
Deprecated.
Configures this output format.
|
void |
open(int taskNumber,
int numTasks)
Deprecated.
Opens a parallel instance of the output format to store the result of its parallel instance.
|
String |
toString()
Deprecated.
|
void |
writeRecord(T record)
Deprecated.
Adds a record to the output.
|
getRuntimeContext, setRuntimeContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
open
public PrintingOutputFormat()
public PrintingOutputFormat(boolean stdErr)
stdErr
- True, if the format should print to standard error instead of standard out.public PrintingOutputFormat(String sinkIdentifier, boolean stdErr)
sinkIdentifier
- Message that is prefixed to the output of the value.stdErr
- True, if the format should print to standard error instead of standard out.public void configure(Configuration parameters)
OutputFormat
This method is always called first on a newly instantiated output format.
parameters
- The configuration with all parameters.public void open(int taskNumber, int numTasks)
OutputFormat
When this method is called, the output format it guaranteed to be configured.
taskNumber
- The number of the parallel instance.numTasks
- The number of parallel tasks.public void writeRecord(T record)
OutputFormat
When this method is called, the output format it guaranteed to be opened.
record
- The records to add to the output.public void close()
OutputFormat
When this method is called, the output format it guaranteed to be opened.
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.