|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cascading.tap.Tap cascading.tap.SinkTap cascading.tap.MultiSinkTap
public class MultiSinkTap
Class MultiSinkTap is both a CompositeTap
and SinkTap
that can write to multiple child Tap
instances simultaneously.
MultiSourceTap
.
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, 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 |
---|
@ConstructorProperties(value="taps") public MultiSinkTap(Tap... taps)
taps
- of type Tap...Method Detail |
---|
protected Tap[] getTaps()
public Tap[] getChildTaps()
getChildTaps
in interface CompositeTap
public boolean isWriteDirect()
Tap
TupleEntryCollector
should be used to sink values.
isWriteDirect
in class Tap
public Path getPath()
Tap
getPath
in class Tap
public TupleEntryCollector openForWrite(JobConf conf) throws IOException
Tap
openForWrite
in class SinkTap
conf
- of type JobConf
IOException
- whenpublic void sinkInit(JobConf conf) throws IOException
Tap
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)
sinkInit
in class Tap
conf
- of type JobConf
IOException
- on resource initialization failure.public boolean makeDirs(JobConf conf) throws IOException
Tap
makeDirs
in class Tap
conf
- of type JobConf
IOException
- when there is an error making directoriespublic boolean deletePath(JobConf conf) throws IOException
Tap
deletePath
in class Tap
conf
- of type JobConf
IOException
- when the resource cannot be deletedpublic boolean pathExists(JobConf conf) throws IOException
Tap
pathExists
in class Tap
conf
- of type JobConf
IOException
- when the status cannot be determinedpublic long getPathModified(JobConf conf) throws IOException
Tap
getPathModified
in class Tap
conf
- of type JobConf
IOException
- when the modified date cannot be determinedpublic void sink(TupleEntry tupleEntry, OutputCollector outputCollector) throws IOException
Tap
sink
in class Tap
tupleEntry
- of type TupleEntryoutputCollector
- of type OutputCollector
IOException
- when the resource cannot be written topublic Scheme getScheme()
Tap
getScheme
in class Tap
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Tap
public int hashCode()
hashCode
in class Tap
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |