cascading.scheme
Class SequenceFile

java.lang.Object
  extended by cascading.scheme.Scheme
      extended by cascading.scheme.SequenceFile
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
WritableSequenceFile

public class SequenceFile
extends Scheme

A SequenceFile is a type of Scheme, which is a flat file consisting of binary key/value pairs. This is a space and time efficient means to store data.

See Also:
Serialized Form

Constructor Summary
protected SequenceFile()
          Protected for use by TempDfs and other subclasses.
  SequenceFile(Fields fields)
          Creates a new SequenceFile instance that stores the given field names.
 
Method Summary
 void sink(TupleEntry tupleEntry, 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, getTrace, hashCode, isSink, isSource, isSymmetrical, isWriteDirect, setNumSinkParts, setSinkFields, setSourceFields, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SequenceFile

protected SequenceFile()
Protected for use by TempDfs and other subclasses. Not for general consumption.


SequenceFile

@ConstructorProperties(value="fields")
public SequenceFile(Fields fields)
Creates a new SequenceFile instance that stores the given field names.

Parameters:
fields -
Method Detail

sourceInit

public void sourceInit(Tap tap,
                       JobConf conf)
Description copied from class: Scheme
Method sourceInit initializes this instance as a source.

Specified by:
sourceInit in class Scheme
Parameters:
tap - of type Tap
conf - of type JobConf

sinkInit

public void sinkInit(Tap tap,
                     JobConf conf)
Description copied from class: Scheme
Method sinkInit initializes this instance as a sink.

Specified by:
sinkInit in class Scheme
Parameters:
tap - of type Tap
conf - of type JobConf

source

public Tuple source(Object key,
                    Object value)
Description copied from class: Scheme
Method source takes the given Hadoop key and value and returns a new Tuple instance.

Specified by:
source in class Scheme
Parameters:
key - of type WritableComparable
value - of type Writable
Returns:
Tuple

sink

public void sink(TupleEntry tupleEntry,
                 OutputCollector outputCollector)
          throws IOException
Description copied from class: Scheme
Method sink writes out the given Tuple instance to the outputCollector.

Specified by:
sink in class Scheme
outputCollector - of type OutputCollector @throws IOException when
Throws:
IOException


Copyright © 2007-2010 Concurrent, Inc. All Rights Reserved.