Spring for Apache Hadoop

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

java.lang.Object
  extended by cascading.tap.Tap<Config,Input,java.lang.Void>
      extended by cascading.tap.SourceTap<java.util.Properties,org.springframework.core.io.Resource>
          extended by org.springframework.data.hadoop.cascading.tap.local.ResourceTap
All Implemented Interfaces:
cascading.flow.FlowElement, java.io.Serializable

public class ResourceTap
extends cascading.tap.SourceTap<java.util.Properties,org.springframework.core.io.Resource>

SourceTap for Spring's Resource abstraction. Multiple resources (resulting from pattern matching for example) can be used.

Author:
Costin Leau
See Also:
Serialized Form

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

Constructor Detail

ResourceTap

public ResourceTap(cascading.scheme.Scheme<java.util.Properties,org.springframework.core.io.Resource,?,?,?> scheme,
                   org.springframework.core.io.Resource resource)
Constructs a new ResourceTap instance.

Parameters:
scheme - scheme to use
resource - Resource to read from

ResourceTap

public ResourceTap(cascading.scheme.Scheme<java.util.Properties,org.springframework.core.io.Resource,?,?,?> scheme,
                   org.springframework.core.io.Resource[] resources)
Constructs a new ResourceTap instance. Backed by multiple resources ( allowing for pattern matching to occur).

Parameters:
scheme - scheme to use
resources - Resources to read from
Method Detail

getIdentifier

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

openForRead

public cascading.tuple.TupleEntryIterator openForRead(cascading.flow.FlowProcess<java.util.Properties> flowProcess,
                                                      org.springframework.core.io.Resource input)
                                               throws java.io.IOException
Specified by:
openForRead in class cascading.tap.Tap<java.util.Properties,org.springframework.core.io.Resource,java.lang.Void>
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,org.springframework.core.io.Resource,java.lang.Void>
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,org.springframework.core.io.Resource,java.lang.Void>
Throws:
java.io.IOException

Spring for Apache Hadoop