cascading.tap.hadoop
Class TapCollector

java.lang.Object
  extended by cascading.tuple.TupleEntryCollector
      extended by cascading.tap.hadoop.TapCollector
All Implemented Interfaces:
OutputCollector

public class TapCollector
extends TupleEntryCollector
implements OutputCollector

Class TapCollector is a kind of TupleEntryCollector that writes tuples to the resource managed by a particular Tap instance.


Field Summary
 
Fields inherited from class cascading.tuple.TupleEntryCollector
declared
 
Constructor Summary
TapCollector(Tap tap, JobConf conf)
          Constructor TapCollector creates a new TapCollector instance.
TapCollector(Tap tap, String prefix, JobConf conf)
          Constructor TapCollector creates a new TapCollector instance.
 
Method Summary
 void close()
          Method close closes the underlying resource being written to.
 void collect(Object writableComparable, Object writable)
          Method collect writes the given values to the Tap this instance encapsulates.
protected  void collect(Tuple tuple)
           
 void setReporter(Reporter reporter)
           
 
Methods inherited from class cascading.tuple.TupleEntryCollector
add, add
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TapCollector

public TapCollector(Tap tap,
                    JobConf conf)
             throws IOException
Constructor TapCollector creates a new TapCollector instance.

Parameters:
tap - of type Tap
conf - of type JobConf
Throws:
IOException - when fails to initialize

TapCollector

public TapCollector(Tap tap,
                    String prefix,
                    JobConf conf)
             throws IOException
Constructor TapCollector creates a new TapCollector instance.

Parameters:
tap - of type Tap
prefix - of type String
conf - of type JobConf
Throws:
IOException - when fails to initialize
Method Detail

setReporter

public void setReporter(Reporter reporter)

collect

protected void collect(Tuple tuple)
Specified by:
collect in class TupleEntryCollector

close

public void close()
Description copied from class: TupleEntryCollector
Method close closes the underlying resource being written to. This method should be called when no more Tuple instances will be written out.

Overrides:
close in class TupleEntryCollector

collect

public void collect(Object writableComparable,
                    Object writable)
             throws IOException
Method collect writes the given values to the Tap this instance encapsulates.

Specified by:
collect in interface OutputCollector
Parameters:
writableComparable - of type WritableComparable
writable - of type Writable
Throws:
IOException - when


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