cascading.tap
Class TemplateTap.TemplateScheme

java.lang.Object
  extended by cascading.scheme.Scheme
      extended by cascading.tap.TemplateTap.TemplateScheme
All Implemented Interfaces:
Serializable
Enclosing class:
TemplateTap

public static class TemplateTap.TemplateScheme
extends Scheme

See Also:
Serialized Form

Constructor Summary
TemplateTap.TemplateScheme(Scheme scheme)
           
TemplateTap.TemplateScheme(Scheme scheme, String pathTemplate, Fields pathFields)
           
 
Method Summary
 int getNumSinkParts()
          Method getNumSinkParts returns the numSinkParts of this Scheme object.
 Fields getSinkFields()
          Method getSinkFields returns the sinkFields of this Scheme object.
 Fields getSourceFields()
          Method getSourceFields returns the sourceFields of this Scheme object.
 boolean isWriteDirect()
          Method isWriteDirect returns true if the parent Tap instances TupleEntryCollector should be used to sink values.
 void setNumSinkParts(int numSinkParts)
          Method setNumSinkParts sets the numSinkParts of this Scheme object.
 void setSinkFields(Fields sinkFields)
          Method setSinkFields sets the sinkFields of this Scheme object.
 void setSourceFields(Fields sourceFields)
          Method setSourceFields sets the sourceFields of this Scheme object.
 void sink(TupleEntry tupleEntry, OutputCollector outputCollector)
          Method sink writes out the given Tuple instance to the outputCollector.
 void sinkInit(Tap tap, JobConf conf)
          Method sinkInit initializes this instance as a sink.
 Tuple source(Object key, Object value)
          Method source takes the given Hadoop key and value and returns a new Tuple instance.
 void sourceInit(Tap tap, JobConf conf)
          Method sourceInit initializes this instance as a source.
 
Methods inherited from class cascading.scheme.Scheme
equals, getTrace, hashCode, isSink, isSource, isSymmetrical, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TemplateTap.TemplateScheme

public TemplateTap.TemplateScheme(Scheme scheme)

TemplateTap.TemplateScheme

public TemplateTap.TemplateScheme(Scheme scheme,
                                  String pathTemplate,
                                  Fields pathFields)
Method Detail

getSinkFields

public Fields getSinkFields()
Description copied from class: Scheme
Method getSinkFields returns the sinkFields of this Scheme object.

Overrides:
getSinkFields in class Scheme
Returns:
the sinkFields (type Fields) of this Scheme object.

setSinkFields

public void setSinkFields(Fields sinkFields)
Description copied from class: Scheme
Method setSinkFields sets the sinkFields of this Scheme object.

Overrides:
setSinkFields in class Scheme
Parameters:
sinkFields - the sinkFields of this Scheme object.

getSourceFields

public Fields getSourceFields()
Description copied from class: Scheme
Method getSourceFields returns the sourceFields of this Scheme object.

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

setSourceFields

public void setSourceFields(Fields sourceFields)
Description copied from class: Scheme
Method setSourceFields sets the sourceFields of this Scheme object.

Overrides:
setSourceFields in class Scheme
Parameters:
sourceFields - the sourceFields of this Scheme object.

getNumSinkParts

public int getNumSinkParts()
Description copied from class: Scheme
Method getNumSinkParts returns the numSinkParts of this Scheme object.

Overrides:
getNumSinkParts in class Scheme
Returns:
the numSinkParts (type int) of this Scheme object.

setNumSinkParts

public void setNumSinkParts(int numSinkParts)
Description copied from class: Scheme
Method setNumSinkParts sets the numSinkParts of this Scheme object.

Overrides:
setNumSinkParts in class Scheme
Parameters:
numSinkParts - the numSinkParts of this Scheme object.

isWriteDirect

public boolean isWriteDirect()
Description copied from class: Scheme
Method isWriteDirect returns true if the parent Tap instances TupleEntryCollector should be used to sink values.

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

sourceInit

public void sourceInit(Tap tap,
                       JobConf conf)
                throws IOException
Description copied from class: Scheme
Method sourceInit initializes this instance as a source.

Specified by:
sourceInit in class Scheme
Parameters:
tap - of type Tap
conf - of type JobConf
Throws:
IOException - on initializatin failure

sinkInit

public void sinkInit(Tap tap,
                     JobConf conf)
              throws IOException
Description copied from class: Scheme
Method sinkInit initializes this instance as a sink.

Specified by:
sinkInit in class Scheme
Parameters:
tap - of type Tap
conf - of type JobConf
Throws:
IOException - on initialization failure

source

public Tuple source(Object key,
                    Object value)
Description copied from class: Scheme
Method source takes the given Hadoop key and value and returns a new Tuple instance.

Specified by:
source in class Scheme
Parameters:
key - of type WritableComparable
value - of type Writable
Returns:
Tuple

sink

public void sink(TupleEntry tupleEntry,
                 OutputCollector outputCollector)
          throws IOException
Description copied from class: Scheme
Method sink writes out the given Tuple instance to the outputCollector.

Specified by:
sink in class Scheme
outputCollector - of type OutputCollector @throws IOException when
Throws:
IOException


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