cascading.tap.local
Class StdErrTap

java.lang.Object
  extended by cascading.tap.Tap<Config,Void,Output>
      extended by cascading.tap.SinkTap<Properties,OutputStream>
          extended by cascading.tap.local.StdErrTap
All Implemented Interfaces:
FlowElement, Serializable

public class StdErrTap
extends SinkTap<Properties,OutputStream>

Class StdErrTap provides a local mode tap for writing data to the stderr stream.

See Also:
Serialized Form

Constructor Summary
StdErrTap(Scheme<Properties,?,OutputStream,?,?> scheme)
           
 
Method Summary
 boolean createResource(Properties conf)
          Method createResource creates the underlying resource.
 boolean deleteResource(Properties conf)
          Method deleteResource deletes the resource represented by this instance.
 String getIdentifier()
          Method getIdentifier returns a String representing the resource this Tap instance represents.
 long getModifiedTime(Properties conf)
          Method getModifiedTime returns the date this resource was last modified.
 TupleEntryCollector openForWrite(FlowProcess<Properties> flowProcess, OutputStream output)
          Method openForWrite opens the resource represented by this Tap instance for writing.
 boolean resourceExists(Properties conf)
          Method resourceExists returns true if the path represented by this instance exists.
 
Methods inherited from class cascading.tap.SinkTap
getSourceFields, isSource, openForRead, sourceConfInit
 
Methods inherited from class cascading.tap.Tap
commitResource, createResource, deleteResource, equals, flowConfInit, getConfigDef, getFullIdentifier, getFullIdentifier, getModifiedTime, getScheme, getSinkFields, getSinkMode, getStepConfigDef, getTrace, hasConfigDef, hashCode, hasStepConfigDef, id, isEquivalentTo, isKeep, isReplace, isSink, isTemporary, isUpdate, openForRead, openForWrite, outgoingScopeFor, presentSinkFields, presentSourceFields, resolveIncomingOperationArgumentFields, resolveIncomingOperationPassThroughFields, resourceExists, retrieveSinkFields, retrieveSourceFields, rollbackResource, setScheme, sinkConfInit, taps, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StdErrTap

public StdErrTap(Scheme<Properties,?,OutputStream,?,?> scheme)
Method Detail

getIdentifier

public String getIdentifier()
Description copied from class: Tap
Method getIdentifier returns a String representing the resource this Tap instance represents.

Often, if the tap accesses a filesystem, the identifier is nothing more than the path to the file or directory. In other cases it may be a an URL or URI representing a connection string or remote resource.

Any two Tap instances having the same value for the identifier are considered equal.

Specified by:
getIdentifier in class Tap<Properties,Void,OutputStream>
Returns:
String

openForWrite

public TupleEntryCollector openForWrite(FlowProcess<Properties> flowProcess,
                                        OutputStream output)
                                 throws IOException
Description copied from class: Tap
Method openForWrite opens the resource represented by this Tap instance for writing.

This method is used internally and does not honor the SinkMode setting. If SinkMode is SinkMode.REPLACE, this call may fail. See Tap.openForWrite(cascading.flow.FlowProcess).

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

Specified by:
openForWrite in class Tap<Properties,Void,OutputStream>
Parameters:
flowProcess - of type FlowProcess
output - of type Output
Returns:
TupleEntryCollector
Throws:
IOException - when the resource cannot be opened

createResource

public boolean createResource(Properties conf)
                       throws IOException
Description copied from class: Tap
Method createResource creates the underlying resource.

Specified by:
createResource in class Tap<Properties,Void,OutputStream>
Parameters:
conf - of type Config
Returns:
boolean
Throws:
IOException - when there is an error making directories

deleteResource

public boolean deleteResource(Properties conf)
                       throws IOException
Description copied from class: Tap
Method deleteResource deletes the resource represented by this instance.

Specified by:
deleteResource in class Tap<Properties,Void,OutputStream>
Parameters:
conf - of type Config
Returns:
boolean
Throws:
IOException - when the resource cannot be deleted

resourceExists

public boolean resourceExists(Properties conf)
                       throws IOException
Description copied from class: Tap
Method resourceExists returns true if the path represented by this instance exists.

Specified by:
resourceExists in class Tap<Properties,Void,OutputStream>
Parameters:
conf - of type Config
Returns:
true if the underlying resource already exists
Throws:
IOException - when the status cannot be determined

getModifiedTime

public long getModifiedTime(Properties conf)
                     throws IOException
Description copied from class: Tap
Method getModifiedTime returns the date this resource was last modified.

Specified by:
getModifiedTime in class Tap<Properties,Void,OutputStream>
Parameters:
conf - of type Config
Returns:
The date this resource was last modified.
Throws:
IOException


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