cascading.tap.hadoop

## Class BaseDistCacheTap

- java.lang.Object
- - cascading.tap.Tap<Config,Input,Output>
  - - cascading.tap.DecoratorTap<java.lang.Void,org.apache.hadoop.conf.Configuration,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector>
    - - cascading.tap.hadoop.BaseDistCacheTap

All Implemented Interfaces:
  FlowElement, ScopedElement, Traceable, java.io.Serializable

Direct Known Subclasses:
  DistCacheTap

    public abstract class BaseDistCacheTap
    extends DecoratorTap<java.lang.Void,org.apache.hadoop.conf.Configuration,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector>

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class cascading.tap.DecoratorTap

`metaInfo, original`

### Constructor Summary

Constructors
Constructor and Description
`BaseDistCacheTap(Tap<org.apache.hadoop.conf.Configuration,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector> original)`

### Method Summary

Methods
`protected abstract void` `addLocalCacheFiles(org.apache.hadoop.conf.Configuration conf, java.net.URI uri)`
`protected abstract org.apache.hadoop.fs.Path[]` `getLocalCacheFiles(FlowProcess<? extends org.apache.hadoop.conf.Configuration> flowProcess)`
`TupleEntryIterator` `openForRead(FlowProcess<? extends org.apache.hadoop.conf.Configuration> flowProcess, org.apache.hadoop.mapred.RecordReader input)` Method openForRead opens the resource represented by this Tap instance for reading.
`void` `sourceConfInit(FlowProcess<? extends org.apache.hadoop.conf.Configuration> process, org.apache.hadoop.conf.Configuration conf)` Method sourceConfInit initializes this instance as a source.

### Methods inherited from class cascading.tap.DecoratorTap

`commitResource, createResource, createResource, deleteResource, deleteResource, flowConfInit, getConfigDef, getFullIdentifier, getFullIdentifier, getIdentifier, getMetaInfo, getModifiedTime, getModifiedTime, getNodeConfigDef, getOriginal, getScheme, getSinkFields, getSinkMode, getSourceFields, getStepConfigDef, getTrace, hasConfigDef, hasNodeConfigDef, hasStepConfigDef, isKeep, isReplace, isSink, isSource, isTemporary, isUpdate, openForRead, openForWrite, openForWrite, outgoingScopeFor, prepareResourceForRead, prepareResourceForWrite, presentSinkFields, presentSourceFields, resolveIncomingOperationArgumentFields, resolveIncomingOperationPassThroughFields, resourceExists, resourceExists, retrieveSinkFields, retrieveSourceFields, rollbackResource, setMetaInfo, setOriginal, sinkConfInit, toString`

### Methods inherited from class cascading.tap.Tap

`equals, hashCode, id, setScheme, taps`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### BaseDistCacheTap

    public BaseDistCacheTap(Tap<org.apache.hadoop.conf.Configuration,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector> original)

### Method Detail

#### sourceConfInit

    public void sourceConfInit(FlowProcess<? extends org.apache.hadoop.conf.Configuration> process,
                      org.apache.hadoop.conf.Configuration conf)

Description copied from class: `Tap`
Method sourceConfInit 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)`

Note that no resources or services should be modified by this method.

Overrides:
  `sourceConfInit` in class `DecoratorTap<java.lang.Void,org.apache.hadoop.conf.Configuration,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector>`
Parameters:
  `process` - of type FlowProcess
  `conf` - of type Config

#### openForRead

    public TupleEntryIterator openForRead(FlowProcess<? extends org.apache.hadoop.conf.Configuration> flowProcess,
                                 org.apache.hadoop.mapred.RecordReader input)
                                   throws java.io.IOException

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

`input` value may be null, if so, sub-classes must inquire with the underlying `Scheme` via `Scheme.sourceConfInit(cascading.flow.FlowProcess, Tap, Object)` to get the proper input type and instantiate it before calling `super.openForRead()`.

Note the returned iterator will return the same instance of `TupleEntry` on every call, thus a copy must be made of either the TupleEntry or the underlying `Tuple` instance if they are to be stored in a Collection.

Overrides:
  `openForRead` in class `DecoratorTap<java.lang.Void,org.apache.hadoop.conf.Configuration,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector>`
Parameters:
  `flowProcess` - of type FlowProcess
  `input` - of type Input
Returns:
  TupleEntryIterator
Throws:
  `java.io.IOException` - when the resource cannot be opened

#### getLocalCacheFiles

    protected abstract org.apache.hadoop.fs.Path[] getLocalCacheFiles(FlowProcess<? extends org.apache.hadoop.conf.Configuration> flowProcess)
                                                               throws java.io.IOException

Throws:
  `java.io.IOException`

#### addLocalCacheFiles

    protected abstract void addLocalCacheFiles(org.apache.hadoop.conf.Configuration conf,
                          java.net.URI uri)