## cascading.tap
Class SourceTap

    java.lang.Object
      cascading.tap.Tap
          cascading.tap.SourceTap

All Implemented Interfaces:
  FlowElement, Serializable

Direct Known Subclasses:
  MultiSourceTap

    public abstract class SourceTap

extends Tap

Class SourceTap is the base class for `MultiSourceTap`. 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.
`TupleEntryIterator` `openForRead(JobConf conf)` Method openForRead opens the resource represented by this Tap instance.
`TupleEntryCollector` `openForWrite(JobConf conf)` Method openForWrite opens the resource represented by this Tap instance.
`void` `sink(TupleEntry tupleEntry, OutputCollector outputCollector)` Method sink emits the sink value(s) to the OutputCollector

Methods inherited from class cascading.tap.Tap
`equals, flowInit, getIdentifier, getPath, getPathModified, getQualifiedPath, getScheme, getSinkMode, getSourceFields, getTrace, hashCode, isAppend, isEquivalentTo, isKeep, isReplace, isSource, isUpdate, isWriteDirect, outgoingScopeFor, pathExists, resolveFields, resolveIncomingOperationFields, setScheme, setWriteDirect, 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(TupleEntry tupleEntry,
                     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:
    `tupleEntry` - of type TupleEntry
    `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:
    boolean

### 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)`

### openForRead

    public TupleEntryIterator openForRead(JobConf conf)
                                   throws IOException

  Description copied from class: `Tap`
  Method openForRead opens the resource represented by this Tap instance.

  Specified by:
    `openForRead` in class `Tap`
  Parameters:
    `conf` - of type JobConf
  Returns:
    TupleEntryIterator
  Throws:
    `IOException` - when the resource cannot be opened

### openForWrite

    public TupleEntryCollector openForWrite(JobConf conf)
                                     throws IOException

  Description copied from class: `Tap`
  Method openForWrite opens the resource represented by this Tap instance.

  Specified by:
    `openForWrite` in class `Tap`
  Parameters:
    `conf` - of type JobConf
  Returns:
    TupleEntryCollector
  Throws:
    `IOException` - when

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