Spring for Apache Hadoop

org.springframework.data.hadoop.cascading.tap.local
Class MessageHandlerTap

java.lang.Object
  extended by cascading.tap.Tap<Config,java.lang.Void,Output>
      extended by cascading.tap.SinkTap<java.util.Properties,java.io.OutputStream>
          extended by org.springframework.data.hadoop.cascading.tap.local.MessageHandlerTap
All Implemented Interfaces:
cascading.flow.FlowElement, java.io.Serializable

public class MessageHandlerTap
extends cascading.tap.SinkTap<java.util.Properties,java.io.OutputStream>

SinkTap on top of Spring Integration MessageHandler.

The creation of the message depends on the behaviour of the underlying stream. Each time it is flushed, a Message will be created (with payload of type byte[]). If supported by the underlying stream, a message will be created for each tuple.

Author:
Costin Leau
See Also:
Serialized Form

Constructor Summary
MessageHandlerTap(cascading.scheme.Scheme<java.util.Properties,?,java.io.OutputStream,?,?> scheme, org.springframework.integration.core.MessageHandler handler)
           
 
Method Summary
 boolean createResource(java.util.Properties conf)
           
 boolean deleteResource(java.util.Properties conf)
           
 java.lang.String getIdentifier()
           
 long getModifiedTime(java.util.Properties conf)
           
 cascading.tuple.TupleEntryCollector openForWrite(cascading.flow.FlowProcess<java.util.Properties> flowProcess, java.io.OutputStream output)
           
 boolean resourceExists(java.util.Properties conf)
           
 
Methods inherited from class cascading.tap.SinkTap
getSourceFields, isSource, openForRead, sourceConfInit
 
Methods inherited from class cascading.tap.Tap
commitResource, equals, flowConfInit, getConfigDef, getFullIdentifier, getScheme, getSinkFields, getSinkMode, getStepConfigDef, getTrace, hasConfigDef, hashCode, hasStepConfigDef, id, isEquivalentTo, isKeep, isReplace, isSink, isTemporary, isUpdate, openForRead, openForWrite, outgoingScopeFor, presentSinkFields, presentSourceFields, resolveIncomingOperationArgumentFields, resolveIncomingOperationPassThroughFields, retrieveSinkFields, retrieveSourceFields, rollbackResource, setScheme, sinkConfInit, taps, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageHandlerTap

public MessageHandlerTap(cascading.scheme.Scheme<java.util.Properties,?,java.io.OutputStream,?,?> scheme,
                         org.springframework.integration.core.MessageHandler handler)
Method Detail

getIdentifier

public java.lang.String getIdentifier()
Specified by:
getIdentifier in class cascading.tap.Tap<java.util.Properties,java.lang.Void,java.io.OutputStream>

openForWrite

public cascading.tuple.TupleEntryCollector openForWrite(cascading.flow.FlowProcess<java.util.Properties> flowProcess,
                                                        java.io.OutputStream output)
                                                 throws java.io.IOException
Specified by:
openForWrite in class cascading.tap.Tap<java.util.Properties,java.lang.Void,java.io.OutputStream>
Throws:
java.io.IOException

createResource

public boolean createResource(java.util.Properties conf)
                       throws java.io.IOException
Specified by:
createResource in class cascading.tap.Tap<java.util.Properties,java.lang.Void,java.io.OutputStream>
Throws:
java.io.IOException

deleteResource

public boolean deleteResource(java.util.Properties conf)
                       throws java.io.IOException
Specified by:
deleteResource in class cascading.tap.Tap<java.util.Properties,java.lang.Void,java.io.OutputStream>
Throws:
java.io.IOException

resourceExists

public boolean resourceExists(java.util.Properties conf)
                       throws java.io.IOException
Specified by:
resourceExists in class cascading.tap.Tap<java.util.Properties,java.lang.Void,java.io.OutputStream>
Throws:
java.io.IOException

getModifiedTime

public long getModifiedTime(java.util.Properties conf)
                     throws java.io.IOException
Specified by:
getModifiedTime in class cascading.tap.Tap<java.util.Properties,java.lang.Void,java.io.OutputStream>
Throws:
java.io.IOException

Spring for Apache Hadoop