public class TokenInputFormat extends eu.stratosphere.api.java.record.io.GenericInputFormat
Constructor and Description |
---|
TokenInputFormat() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close an input split.
|
void |
configure(eu.stratosphere.configuration.Configuration parameters)
Configure the format.
|
TokenInputSplit[] |
createInputSplits(int numSplits)
Create the input splits that can be processed in parallel.
|
boolean |
nextRecord(eu.stratosphere.types.Record record)
Populate a Record with the token from the split.
|
void |
open(eu.stratosphere.core.io.GenericInputSplit split)
Opens a parallel instance of the input format to work on a split.
|
boolean |
reachedEnd()
See if the token split has been read.
|
public TokenInputFormat()
public void configure(eu.stratosphere.configuration.Configuration parameters)
configure
in interface eu.stratosphere.api.common.io.InputFormat<eu.stratosphere.types.Record,eu.stratosphere.core.io.GenericInputSplit>
configure
in class eu.stratosphere.api.common.io.GenericInputFormat<eu.stratosphere.types.Record>
public TokenInputSplit[] createInputSplits(int numSplits) throws java.io.IOException
createInputSplits
in interface eu.stratosphere.api.common.io.InputFormat<eu.stratosphere.types.Record,eu.stratosphere.core.io.GenericInputSplit>
createInputSplits
in class eu.stratosphere.api.common.io.GenericInputFormat<eu.stratosphere.types.Record>
numSplits
- The minimum number of splits to create. If fewer are
created, some instances may remain idle.java.io.IOException
public void open(eu.stratosphere.core.io.GenericInputSplit split) throws java.io.IOException
When this method is called, the input format it guaranteed to be configured.
open
in interface eu.stratosphere.api.common.io.InputFormat<eu.stratosphere.types.Record,eu.stratosphere.core.io.GenericInputSplit>
open
in class eu.stratosphere.api.common.io.GenericInputFormat<eu.stratosphere.types.Record>
split
- The split to be opened.java.io.IOException
- Thrown, if the spit could not be opened due to an I/O problem.public void close() throws java.io.IOException
close
in interface eu.stratosphere.api.common.io.InputFormat<eu.stratosphere.types.Record,eu.stratosphere.core.io.GenericInputSplit>
close
in class eu.stratosphere.api.common.io.GenericInputFormat<eu.stratosphere.types.Record>
java.io.IOException
public boolean reachedEnd() throws java.io.IOException
java.io.IOException
public boolean nextRecord(eu.stratosphere.types.Record record) throws java.io.IOException
java.io.IOException