## cascading.tap
Class SinkTap

    java.lang.Object
      cascading.tap.Tap
          cascading.tap.SinkTap

All Implemented Interfaces:
  FlowElement, Serializable

Direct Known Subclasses:
  MultiSinkTap, TemplateTap

    public abstract class SinkTap

extends Tap

Class SinkTap is the base class for `TemplateTap`. Some `Tap` instances may only be sinks (as opposed to being a source). These types should subclass SinkTap for convenience.

See Also:
  Serialized Form

Constructor Summary
`protected` `SinkTap()`
`protected` `SinkTap(Scheme scheme)`
`protected` `SinkTap(Scheme scheme, SinkMode sinkMode)`

Method Summary
`Fields` `getSourceFields()` Method getSourceFields returns the sourceFields of this Tap object.
`boolean` `isSource()` Method isSource returns true if this Tap instance can be used as a source.
`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.
`Tuple` `source(Object key, Object value)` Method source returns the source value as an instance of `Tuple`
`void` `sourceInit(JobConf conf)` Method sourceInit initializes this instance as a source.

Methods inherited from class cascading.tap.Tap
`deletePath, equals, flowInit, getIdentifier, getPath, getPathModified, getQualifiedPath, getScheme, getSinkFields, getSinkMode, getTrace, hashCode, isAppend, isEquivalentTo, isKeep, isReplace, isSink, isUpdate, isWriteDirect, makeDirs, outgoingScopeFor, pathExists, resolveFields, resolveIncomingOperationFields, setScheme, setWriteDirect, sink, sinkInit, taps`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SinkTap

    protected SinkTap()

### SinkTap

    protected SinkTap(Scheme scheme)

### SinkTap

    protected SinkTap(Scheme scheme,
                      SinkMode sinkMode)

Method Detail

### getSourceFields

    public Fields getSourceFields()

  Description copied from class: `Tap`
  Method getSourceFields returns the sourceFields of this Tap object.

  Overrides:
    `getSourceFields` in class `Tap`
  Returns:
    the sourceFields (type Fields) of this Tap object.

### source

    public Tuple source(Object key,
                        Object value)

  Description copied from class: `Tap`
  Method source returns the source value as an instance of `Tuple`

  Overrides:
    `source` in class `Tap`
  Parameters:
    `key` - of type WritableComparable
    `value` - of type Writable
  Returns:
    Tuple

### isSource

    public boolean isSource()

  Description copied from class: `Tap`
  Method isSource returns true if this Tap instance can be used as a source.

  Overrides:
    `isSource` in class `Tap`
  Returns:
    boolean

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

### sourceInit

    public void sourceInit(JobConf conf)
                    throws IOException

  Description copied from class: `Tap`
  Method sourceInit initializes this instance as a source.

  This method maybe called more than once if this Tap instance is used outside the scope of a `Flow` instance or if it participates in multiple times in a given Flow or across different Flows in a `Cascade`.

  In the context of a Flow, it will be called after `FlowListener.onStarting(cascading.flow.Flow)`

  Overrides:
    `sourceInit` in class `Tap`
  Parameters:
    `conf` - of type JobConf
  Throws:
    `IOException` - on resource initialization failure.

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