public class TokenOutputFormat extends java.lang.Object implements eu.stratosphere.api.common.io.OutputFormat<eu.stratosphere.types.Record>
Modifier and Type | Class and Description |
---|---|
protected static class |
TokenOutputFormat.AbstractConfigBuilder<T>
Abstract builder used to set parameters to the input format's configuration in a fluent way.
|
static class |
TokenOutputFormat.ConfigBuilder
A builder used to set parameters to the input format's configuration in a fluent way.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FIELD_TYPE_PARAMETER_PREFIX |
static java.lang.String |
NUM_FIELDS_PARAMETER |
static java.lang.String |
RECORD_POSITION_PARAMETER_PREFIX |
Constructor and Description |
---|
TokenOutputFormat() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Method that marks the end of the life-cycle of parallel output instance.
|
void |
configure(eu.stratosphere.configuration.Configuration parameters)
Configures this output format.
|
static TokenOutputFormat.ConfigBuilder |
configureRecordFormat(eu.stratosphere.api.common.operators.GenericDataSink target)
Creates a configuration builder that can be used to set the input format's parameters to the config in a fluent
fashion.
|
void |
open(int taskNumber)
Opens a parallel instance of the output format to store the result of its parallel instance.
|
void |
writeRecord(eu.stratosphere.types.Record record)
Adds a record to the output.
|
public static final java.lang.String NUM_FIELDS_PARAMETER
public static final java.lang.String FIELD_TYPE_PARAMETER_PREFIX
public static final java.lang.String RECORD_POSITION_PARAMETER_PREFIX
public TokenOutputFormat()
public void configure(eu.stratosphere.configuration.Configuration parameters)
This method is always called first on a newly instantiated output format.
configure
in interface eu.stratosphere.api.common.io.OutputFormat<eu.stratosphere.types.Record>
parameters
- The configuration with all parameters.public void open(int taskNumber) throws java.io.IOException
When this method is called, the output format it guaranteed to be configured.
open
in interface eu.stratosphere.api.common.io.OutputFormat<eu.stratosphere.types.Record>
taskNumber
- The number of the parallel instance.java.io.IOException
- Thrown, if the output could not be opened due to an I/O problem.public void writeRecord(eu.stratosphere.types.Record record) throws java.io.IOException
When this method is called, the output format it guaranteed to be opened.
writeRecord
in interface eu.stratosphere.api.common.io.OutputFormat<eu.stratosphere.types.Record>
record
- The records to add to the output.java.io.IOException
- Thrown, if the records could not be added to to an I/O problem.public void close() throws java.io.IOException
When this method is called, the output format it guaranteed to be opened.
close
in interface eu.stratosphere.api.common.io.OutputFormat<eu.stratosphere.types.Record>
java.io.IOException
- Thrown, if the input could not be closed properly.public static TokenOutputFormat.ConfigBuilder configureRecordFormat(eu.stratosphere.api.common.operators.GenericDataSink target)