cascading.tap
Class SourceTap

java.lang.Object
  extended by cascading.tap.Tap
      extended by cascading.tap.SourceTap
All Implemented Interfaces:
FlowElement, Serializable
Direct Known Subclasses:
MultiTap

public abstract class SourceTap
extends Tap

Class SourceTap is the base class for MultiTap. Some Tap instances may only be sources (as opposed to being a sink). These types should subclass SourceTap for convenience.

See Also:
Serialized Form

Constructor Summary
protected SourceTap()
           
protected SourceTap(Scheme scheme)
           
 
Method Summary
 boolean deletePath(JobConf conf)
          Method deletePath deletes the resource represented by this instance.
 Fields getSinkFields()
          Method getSinkFields returns the sinkFields of this Tap object.
 boolean isSink()
          Method isSink returns true if this Tap instance can be used as a sink.
 boolean makeDirs(JobConf conf)
          Method makeDirs makes all the directories this Tap instance represents.
 void sink(Fields fields, Tuple tuple, OutputCollector outputCollector)
          Method sink emits the sink value(s) to the OutputCollector
 
Methods inherited from class cascading.tap.Tap
equals, flowInit, getPath, getPathModified, getQualifiedPath, getScheme, getSourceFields, hashCode, isDeleteOnSinkInit, isSource, isUseTapCollector, openForRead, openForWrite, outgoingScopeFor, pathExists, resolveFields, resolveIncomingOperationFields, setScheme, setUseTapCollector, sinkInit, source, sourceInit, taps
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceTap

protected SourceTap()

SourceTap

protected SourceTap(Scheme scheme)
Method Detail

getSinkFields

public Fields getSinkFields()
Description copied from class: Tap
Method getSinkFields returns the sinkFields of this Tap object.

Overrides:
getSinkFields in class Tap
Returns:
the sinkFields (type Fields) of this Tap object.

sink

public void sink(Fields fields,
                 Tuple tuple,
                 OutputCollector outputCollector)
          throws IOException
Description copied from class: Tap
Method sink emits the sink value(s) to the OutputCollector

Overrides:
sink in class Tap
Parameters:
fields - of type Fields
tuple - of type Tuple
outputCollector - of type OutputCollector
Throws:
IOException - when the resource cannot be written to

isSink

public final boolean isSink()
Description copied from class: Tap
Method isSink returns true if this Tap instance can be used as a sink.

Overrides:
isSink in class Tap
Returns:
the sink (type boolean) of this Tap object.

deletePath

public boolean deletePath(JobConf conf)
                   throws IOException
Description copied from class: Tap
Method deletePath deletes the resource represented by this instance.

Specified by:
deletePath in class Tap
Parameters:
conf - of type JobConf
Returns:
boolean
Throws:
IOException - when the resource cannot be deleted
See Also:
Tap.deletePath(JobConf)

makeDirs

public boolean makeDirs(JobConf conf)
                 throws IOException
Description copied from class: Tap
Method makeDirs makes all the directories this Tap instance represents.

Specified by:
makeDirs in class Tap
Parameters:
conf - of type JobConf
Returns:
boolean
Throws:
IOException - when there is an error making directories
See Also:
Tap.makeDirs(JobConf)


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