## cascading.tap
Class MultiSinkTap

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

All Implemented Interfaces:
  FlowElement, CompositeTap, Serializable

    public class MultiSinkTap

extends SinkTap
implements CompositeTap

Class MultiSinkTap is both a `CompositeTap` and `SinkTap` that can write to multiple child `Tap` instances simultaneously.

It is the counterpart to `MultiSourceTap`.

See Also:
  Serialized Form

Constructor Summary
`MultiSinkTap(Tap... taps)` Constructor MultiSinkTap creates a new MultiSinkTap instance.

Method Summary
`boolean` `deletePath(JobConf conf)` Method deletePath deletes the resource represented by this instance.
`boolean` `equals(Object o)`
`Tap[]` `getChildTaps()`
`Path` `getPath()` Method getPath returns the Hadoop path to the resource represented by this Tap instance.
`long` `getPathModified(JobConf conf)` Method getPathModified returns the date this resource was last modified.
`Scheme` `getScheme()` Method getScheme returns the scheme of this Tap object.
`protected Tap[]` `getTaps()`
`int` `hashCode()`
`boolean` `isWriteDirect()` Method isWriteDirect returns true if this instances `TupleEntryCollector` should be used to sink values.
`boolean` `makeDirs(JobConf conf)` Method makeDirs makes all the directories this Tap instance represents.
`TupleEntryCollector` `openForWrite(JobConf conf)` Method openForWrite opens the resource represented by this Tap instance.
`boolean` `pathExists(JobConf conf)` Method pathExists return true if the path represented by this instance exists.
`void` `sink(TupleEntry tupleEntry, OutputCollector outputCollector)` Method sink emits the sink value(s) to the OutputCollector
`void` `sinkInit(JobConf conf)` Method sinkInit initializes this instance as a sink.
`String` `toString()`

Methods inherited from class cascading.tap.SinkTap
`getSourceFields, isSource, openForRead, source, sourceInit`

Methods inherited from class cascading.tap.Tap
`flowInit, getIdentifier, getQualifiedPath, getSinkFields, getSinkMode, getTrace, isAppend, isEquivalentTo, isKeep, isReplace, isSink, isUpdate, outgoingScopeFor, resolveFields, resolveIncomingOperationFields, setScheme, setWriteDirect, taps`

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

Constructor Detail

### MultiSinkTap

    @ConstructorProperties(value="taps")
    public MultiSinkTap(Tap... taps)

  Constructor MultiSinkTap creates a new MultiSinkTap instance.

  Parameters:
    `taps` - of type Tap...

Method Detail

### getTaps

    protected Tap[] getTaps()

### getChildTaps

    public Tap[] getChildTaps()

  Specified by:
    `getChildTaps` in interface `CompositeTap`

### isWriteDirect

    public boolean isWriteDirect()

  Description copied from class: `Tap`
  Method isWriteDirect returns true if this instances `TupleEntryCollector` should be used to sink values.

  Overrides:
    `isWriteDirect` in class `Tap`
  Returns:
    the writeDirect (type boolean) of this Tap object.

### getPath

    public Path getPath()

  Description copied from class: `Tap`
  Method getPath returns the Hadoop path to the resource represented by this Tap instance.

  Specified by:
    `getPath` in class `Tap`
  Returns:
    Path

### openForWrite

    public TupleEntryCollector openForWrite(JobConf conf)
                                     throws IOException

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

  Overrides:
    `openForWrite` in class `SinkTap`
  Parameters:
    `conf` - of type JobConf
  Returns:
    TupleEntryCollector
  Throws:
    `IOException` - when

### sinkInit

    public void sinkInit(JobConf conf)
                  throws IOException

  Description copied from class: `Tap`
  Method sinkInit initializes this instance as a sink.

  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`.

  Note this method will be called in context of this Tap being used as a traditional 'sink' and as a 'trap'.

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

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

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

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

### pathExists

    public boolean pathExists(JobConf conf)
                       throws IOException

  Description copied from class: `Tap`
  Method pathExists return true if the path represented by this instance exists.

  Specified by:
    `pathExists` in class `Tap`
  Parameters:
    `conf` - of type JobConf
  Returns:
    boolean
  Throws:
    `IOException` - when the status cannot be determined

### getPathModified

    public long getPathModified(JobConf conf)
                         throws IOException

  Description copied from class: `Tap`
  Method getPathModified returns the date this resource was last modified.

  Specified by:
    `getPathModified` in class `Tap`
  Parameters:
    `conf` - of type JobConf
  Returns:
    long
  Throws:
    `IOException` - when the modified date cannot be determined

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

### getScheme

    public Scheme getScheme()

  Description copied from class: `Tap`
  Method getScheme returns the scheme of this Tap object.

  Overrides:
    `getScheme` in class `Tap`
  Returns:
    the scheme (type Scheme) of this Tap object.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` in class `Tap`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Tap`

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