org.springframework.data.hadoop.cascading.tap.local
Class ResourceTap
java.lang.Object
cascading.tap.Tap<Config,Input,Void>
cascading.tap.SourceTap<Properties,Resource>
org.springframework.data.hadoop.cascading.tap.local.ResourceTap
- All Implemented Interfaces:
- FlowElement, Serializable
public class ResourceTap
- extends SourceTap<Properties,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(Scheme<Properties,Resource,?,?,?> scheme,
Resource resource)
Constructs a new ResourceTap instance. |
ResourceTap(Scheme<Properties,Resource,?,?,?> scheme,
Resource[] resources)
Constructs a new ResourceTap instance. |
| 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 |
ResourceTap
public ResourceTap(Scheme<Properties,Resource,?,?,?> scheme,
Resource resource)
- Constructs a new
ResourceTap instance.
- Parameters:
scheme - scheme to useresource - Resource to read from
ResourceTap
public ResourceTap(Scheme<Properties,Resource,?,?,?> scheme,
Resource[] resources)
- Constructs a new
ResourceTap instance. Backed by multiple resources (
allowing for pattern matching to occur).
- Parameters:
scheme - scheme to useresources - Resources to read from
getIdentifier
public String getIdentifier()
- Specified by:
getIdentifier in class Tap<Properties,Resource,Void>
openForRead
public TupleEntryIterator openForRead(FlowProcess<Properties> flowProcess,
Resource input)
throws IOException
- Specified by:
openForRead in class Tap<Properties,Resource,Void>
- Throws:
IOException
resourceExists
public boolean resourceExists(Properties conf)
throws IOException
- Specified by:
resourceExists in class Tap<Properties,Resource,Void>
- Throws:
IOException
getModifiedTime
public long getModifiedTime(Properties conf)
throws IOException
- Specified by:
getModifiedTime in class Tap<Properties,Resource,Void>
- Throws:
IOException