|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcascading.scheme.Scheme
cascading.scheme.TextLine
public class TextLine
A TextLine is a type of Scheme for plain text files. Files are broken into
lines. Either line-feed or carriage-return are used to signal end of line.
Tuple with two fields, "offset" and "line". But if
a Fields is passed on the constructor with one field, the return tuples will simply
be the "line" value using the given field name.
If all the input files end with ".zip", the ZipInputFormat will be used. This is not
bi-directional, so zip files cannot be written.
| Field Summary | |
|---|---|
static Fields |
DEFAULT_SOURCE_FIELDS
Field DEFAULT_SOURCE_FIELDS |
| Constructor Summary | |
|---|---|
TextLine()
Creates a new TextLine instance that sources "offset" and "line" fields, and sinks all incoming fields, where "offset" is the byte offset in the input file. |
|
TextLine(Fields sourceFields)
Creates a new TextLine instance. |
|
TextLine(Fields sourceFields,
Fields sinkFields)
Creates a new TextLine instance. |
|
TextLine(Fields sourceFields,
Fields sinkFields,
int numSinkParts)
Creates a new TextLine instance. |
|
TextLine(Fields sourceFields,
int numSinkParts)
Creates a new TextLine instance. |
|
TextLine(int numSinkParts)
Creates a new TextLine instance that sources "offset" and "line" fields, and sinks all incoming fields, where "offset" is the byte offset in the input file. |
|
| Method Summary | |
|---|---|
cascading.scheme.TextLine.Compress |
getSinkCompression()
Method getSinkCompression returns the sinkCompression of this TextLine object. |
void |
setSinkCompression(cascading.scheme.TextLine.Compress sinkCompression)
Method setSinkCompression sets the sinkCompression of this TextLine object. |
void |
sink(Fields inFields,
Tuple tuple,
OutputCollector outputCollector)
Method sink writes out the given Tuple instance to the outputCollector. |
void |
sinkInit(Tap tap,
JobConf conf)
Method sinkInit initializes this instance as a sink. |
Tuple |
source(Object key,
Object value)
Method source takes the given Hadoop key and value and returns a new Tuple instance. |
void |
sourceInit(Tap tap,
JobConf conf)
Method sourceInit initializes this instance as a source. |
| Methods inherited from class cascading.scheme.Scheme |
|---|
equals, getNumSinkParts, getSinkFields, getSourceFields, hashCode, setNumSinkParts, setSinkFields, setSourceFields, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Fields DEFAULT_SOURCE_FIELDS
| Constructor Detail |
|---|
public TextLine()
public TextLine(int numSinkParts)
numSinkParts - of type int
public TextLine(Fields sourceFields,
Fields sinkFields)
sourceFields - the source fields for this schemesinkFields - the sink fields for this scheme
public TextLine(Fields sourceFields,
Fields sinkFields,
int numSinkParts)
sourceFields - the source fields for this schemesinkFields - the sink fields for this schemenumSinkParts - of type intpublic TextLine(Fields sourceFields)
sourceFields - the source fields for this scheme
public TextLine(Fields sourceFields,
int numSinkParts)
sourceFields - the source fields for this schemenumSinkParts - of type int| Method Detail |
|---|
public cascading.scheme.TextLine.Compress getSinkCompression()
public void setSinkCompression(cascading.scheme.TextLine.Compress sinkCompression)
sinkCompression - the sinkCompression of this TextLine object.
public void sourceInit(Tap tap,
JobConf conf)
Scheme
sourceInit in class Schemetap - of type Tapconf - of type JobConf
public void sinkInit(Tap tap,
JobConf conf)
throws IOException
Scheme
sinkInit in class Schemetap - of type Tapconf - of type JobConf
IOException - on initialization failure
public Tuple source(Object key,
Object value)
SchemeTuple instance.
source in class Schemekey - of type WritableComparablevalue - of type Writable
public void sink(Fields inFields,
Tuple tuple,
OutputCollector outputCollector)
throws IOException
SchemeTuple instance to the outputCollector.
sink in class SchemeinFields - of type Fieldstuple - of type TupleoutputCollector - of type OutputCollector
IOException - when
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||