OUT
- Type of the elements to write.public abstract class OutputFormatBase<OUT,V> extends RichOutputFormat<OUT>
Modifier | Constructor and Description |
---|---|
protected |
OutputFormatBase(int maxConcurrentRequests,
java.time.Duration maxConcurrentRequestsTimeout) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the format waiting for pending writes and reports errors.
|
void |
open(int taskNumber,
int numTasks)
Opens the format and initializes the flush system.
|
protected abstract com.google.common.util.concurrent.ListenableFuture<V> |
send(OUT value) |
void |
writeRecord(OUT record)
Adds a record to the output.
|
getRuntimeContext, setRuntimeContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
configure
protected OutputFormatBase(int maxConcurrentRequests, java.time.Duration maxConcurrentRequestsTimeout)
public void open(int taskNumber, int numTasks)
taskNumber
- The number of the parallel instance.numTasks
- The number of parallel tasks.public void writeRecord(OUT record) throws IOException
OutputFormat
When this method is called, the output format it guaranteed to be opened.
record
- The records to add to the output.IOException
- Thrown, if the records could not be added due to an I/O problem.public void close() throws IOException
IOException
- Thrown, if the input could not be closed properly.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.