public class FileAdaptorTap<TConfig,TInput,TOutput,OConfig,OInput,OOutput> extends AdaptorTap<TConfig,TInput,TOutput,OConfig,OInput,OOutput> implements FileType<TConfig>
AdaptorTap
to provide adapted FileType
interface semantics.
The adapted Tap
must be of type FileType.
configProvider, original, processProvider
CASCADING_SOURCE_PATH
Constructor and Description |
---|
FileAdaptorTap(Tap<OConfig,OInput,OOutput> original,
java.util.function.Function<FlowProcess<? extends TConfig>,FlowProcess<? extends OConfig>> processProvider,
java.util.function.Function<TConfig,OConfig> configProvider) |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getChildIdentifiers(FlowProcess<? extends TConfig> flowProcess)
Method getChildIdentifiers returns an array of child identifiers if this resource is a directory.
|
java.lang.String[] |
getChildIdentifiers(FlowProcess<? extends TConfig> flowProcess,
int depth,
boolean fullyQualified)
Method getChildIdentifiers returns an array of child identifiers if this resource is a directory.
|
java.lang.String[] |
getChildIdentifiers(TConfig conf)
Method getChildIdentifiers returns an array of child identifiers if this resource is a directory.
|
java.lang.String[] |
getChildIdentifiers(TConfig conf,
int depth,
boolean fullyQualified)
Method getChildIdentifiers returns an array of child identifiers if this resource is a directory.
|
protected FileType<TConfig> |
getFileOriginal() |
long |
getSize(FlowProcess<? extends TConfig> flowProcess)
Method getSize returns the size of the file referenced by this tap.
|
long |
getSize(TConfig conf)
Method getSize returns the size of the file referenced by this tap.
|
boolean |
isDirectory(FlowProcess<? extends TConfig> flowProcess)
Method isDirectory returns true if the underlying resource represents a directory or folder instead
of an individual file.
|
boolean |
isDirectory(TConfig conf)
Method isDirectory returns true if the underlying resource represents a directory or folder instead
of an individual file.
|
commitResource, createResource, createResource, deleteResource, deleteResource, equals, flowConfInit, getConfigDef, getFullIdentifier, getFullIdentifier, getIdentifier, getModifiedTime, getModifiedTime, getNodeConfigDef, getOriginal, getScheme, getSinkFields, getSinkMode, getSourceFields, getStepConfigDef, getTrace, hasConfigDef, hashCode, hasNodeConfigDef, hasStepConfigDef, isKeep, isReplace, isSink, isSource, isTemporary, isUpdate, openForRead, openForRead, openForWrite, openForWrite, outgoingScopeFor, prepareResourceForRead, prepareResourceForWrite, presentSinkFields, presentSourceFields, resolveIncomingOperationArgumentFields, resolveIncomingOperationPassThroughFields, resourceExists, resourceExists, retrieveSinkFields, retrieveSourceFields, rollbackResource, setOriginal, sinkConfInit, sourceConfInit, toString
entryStream, entryStream, entryStreamCopy, entryStreamCopy, id, openForReadUnchecked, setScheme, spliterator, splititerator, taps, tupleStream, tupleStream, tupleStreamCopy, tupleStreamCopy
@ConstructorProperties(value={"original","processProvider","configProvider"}) public FileAdaptorTap(Tap<OConfig,OInput,OOutput> original, java.util.function.Function<FlowProcess<? extends TConfig>,FlowProcess<? extends OConfig>> processProvider, java.util.function.Function<TConfig,OConfig> configProvider)
protected FileType<TConfig> getFileOriginal()
public boolean isDirectory(FlowProcess<? extends TConfig> flowProcess) throws java.io.IOException
FileType
isDirectory
in interface FileType<TConfig>
java.io.IOException
public boolean isDirectory(TConfig conf) throws java.io.IOException
FileType
isDirectory
in interface FileType<TConfig>
conf
- of Confjava.io.IOException
public java.lang.String[] getChildIdentifiers(FlowProcess<? extends TConfig> flowProcess) throws java.io.IOException
FileType
This method will skip Hadoop log directories (_log
).
getChildIdentifiers
in interface FileType<TConfig>
flowProcess
- of type FlowProcessjava.io.IOException
public java.lang.String[] getChildIdentifiers(TConfig conf) throws java.io.IOException
FileType
This method will skip Hadoop log directories (_log
).
getChildIdentifiers
in interface FileType<TConfig>
conf
- of type Confjava.io.IOException
public java.lang.String[] getChildIdentifiers(FlowProcess<? extends TConfig> flowProcess, int depth, boolean fullyQualified) throws java.io.IOException
FileType
This method will skip Hadoop log directories (_log
).
Note that all files encountered up to depth will be returned, and no directories unless the directory is the final path at max depth.
getChildIdentifiers
in interface FileType<TConfig>
java.io.IOException
public java.lang.String[] getChildIdentifiers(TConfig conf, int depth, boolean fullyQualified) throws java.io.IOException
FileType
This method will skip Hadoop log directories (_log
).
Note that all files encountered up to depth will be returned, and no directories unless the directory is the final path at max depth.
getChildIdentifiers
in interface FileType<TConfig>
conf
- of type Confdepth
- the max depth to return.fullyQualified
- true if the returned paths should be fully qualifiedjava.io.IOException
public long getSize(FlowProcess<? extends TConfig> flowProcess) throws java.io.IOException
FileType
Copyright © 2007-2017 Cascading Maintainers. All Rights Reserved.