|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcascading.tap.Tap
cascading.tap.SourceTap
cascading.tap.MultiSourceTap
public class MultiSourceTap
Class MultiSourceTap is used to tie multiple Tap instances into a single resource. Effectively this will allow
multiple files to be concatenated into the requesting pipe assembly, if they all share the same Scheme instance.
TextLine), they may not contain
the same semi-structure internally. For example, one file might be an Apache log file, and anoter might be a Log4J
log file. If each one should be parsed differently, then they must be handled by different pipe assembly branches.
| Field Summary | |
|---|---|
protected Tap[] |
taps
|
| Constructor Summary | |
|---|---|
protected |
MultiSourceTap(Scheme scheme)
|
|
MultiSourceTap(Tap... taps)
Constructor MultiSourceTap creates a new MultiSourceTap instance. |
| Method Summary | |
|---|---|
boolean |
equals(Object object)
|
Tap[] |
getChildTaps()
|
Path |
getPath()
Method getPath() always returns null. |
long |
getPathModified(JobConf conf)
Returns the most current modified time. |
Scheme |
getScheme()
Method getScheme returns the scheme of this Tap object. |
protected Tap[] |
getTaps()
Method getTaps returns the taps of this MultiTap object. |
int |
hashCode()
|
boolean |
isReplace()
Method isReplace indicates whether the resource represented by this instance should be deleted if it already exists when the Flow is started. |
TupleEntryIterator |
openForRead(JobConf conf)
Method openForRead 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 |
sourceInit(JobConf conf)
Method sourceInit initializes this instance as a source. |
String |
toString()
|
| Methods inherited from class cascading.tap.SourceTap |
|---|
deletePath, getSinkFields, isSink, makeDirs, openForWrite, sink |
| Methods inherited from class cascading.tap.Tap |
|---|
flowInit, getIdentifier, getQualifiedPath, getSinkMode, getSourceFields, isAppend, isEquivalentTo, isKeep, isSource, isUpdate, isWriteDirect, outgoingScopeFor, resolveFields, resolveIncomingOperationFields, setScheme, setWriteDirect, sinkInit, source, taps |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Tap[] taps
| Constructor Detail |
|---|
protected MultiSourceTap(Scheme scheme)
@ConstructorProperties(value="taps") public MultiSourceTap(Tap... taps)
taps - of type Tap...| Method Detail |
|---|
protected Tap[] getTaps()
public Tap[] getChildTaps()
getChildTaps in interface CompositeTappublic Path getPath()
getPath in class Tappublic Scheme getScheme()
Tap
getScheme in class Tappublic boolean isReplace()
Tap
isReplace in class Tap
public void sourceInit(JobConf conf)
throws IOException
TapFlow
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)
sourceInit in class Tapconf - of type JobConf
IOException - on resource initialization failure.
public boolean pathExists(JobConf conf)
throws IOException
Tap
pathExists in class Tapconf - of type JobConf
IOException - when the status cannot be determined
public long getPathModified(JobConf conf)
throws IOException
getPathModified in class Tapconf - of type JobConf
IOException - when the modified date cannot be determined
public TupleEntryIterator openForRead(JobConf conf)
throws IOException
Tap
openForRead in class SourceTapconf - of type JobConf
IOException - when the resource cannot be openedpublic boolean equals(Object object)
equals in class Tappublic int hashCode()
hashCode in class Tappublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||