|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcascading.tap.Tap
cascading.tap.Hfs
public class Hfs
Class Hfs is the base class for all Hadoop file system access. Use Dfs, Lfs, or S3fs
for resources specific to Hadoop Distributed file system, the Local file system, or Amazon S3, respectively.
hdfs://... will denonte Dfs, file://... will denote Lfs, and s3://aws_id:aws_secret@bucket/... will denote S3fs.
| Constructor Summary | |
|---|---|
protected |
Hfs()
|
|
Hfs(Fields sourceFields,
String stringPath)
Constructor Hfs creates a new Hfs instance. |
|
Hfs(Fields sourceFields,
String stringPath,
boolean deleteOnSinkInit)
Constructor Hfs creates a new Hfs instance. |
protected |
Hfs(Scheme scheme)
|
|
Hfs(Scheme scheme,
String stringPath)
Constructor Hfs creates a new Hfs instance. |
|
Hfs(Scheme scheme,
String stringPath,
boolean deleteOnSinkInit)
Constructor Hfs creates a new Hfs instance. |
| Method Summary | |
|---|---|
boolean |
containsFile(JobConf conf,
String currentFile)
Method containsFile indicates whether the tap contains a given file. |
boolean |
deletePath(JobConf conf)
Method deletePath deletes the resource represented by this instance. |
boolean |
equals(Object object)
|
protected FileSystem |
getDefaultFileSystem(JobConf jobConf)
|
protected FileSystem |
getFileSystem(JobConf jobConf)
|
Path |
getPath()
Method getPath returns the Hadoop path to the resource represented by this Tap instance. |
long |
getPathModified(JobConf conf)
Method getPathModified returns the date this resource was last modified. |
Path |
getQualifiedPath(JobConf conf)
Method getQualifiedPath returns a FileSystem fully qualified Hadoop Path. |
protected Path |
getTempPath(JobConf conf)
|
protected URI |
getURIScheme(JobConf jobConf)
|
int |
hashCode()
|
boolean |
isDeleteOnSinkInit()
Method isDeleteOnSinkInit indicates whether the resource represented by this instance should be deleted if it already exists when the tap is initialized. |
boolean |
isUseTapCollector()
Method isUseTapCollector returns true if this instances TapCollector should be used to sink values. |
boolean |
makeDirs(JobConf conf)
Method makeDirs makes all the directories this Tap instance represents. |
protected String |
makeTemporaryPathDir(String name)
|
protected URI |
makeURIScheme(JobConf jobConf)
|
boolean |
pathExists(JobConf conf)
Method pathExists return true if the path represented by this instance exists. |
protected void |
setStringPath(String stringPath)
|
protected void |
setUriScheme(URI uriScheme)
|
void |
sinkInit(JobConf conf)
Method sinkInit initializes this instance as a sink. |
void |
sourceInit(JobConf conf)
Method sourceInit initializes this instance as a source. |
String |
toString()
|
| Methods inherited from class cascading.tap.Tap |
|---|
getScheme, getSinkFields, getSourceFields, isSink, isSource, openForRead, openForWrite, outgoingScopeFor, resolveFields, resolveIncomingOperationFields, setScheme, setUseTapCollector, sink, source, taps |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Hfs()
protected Hfs(Scheme scheme)
public Hfs(Fields sourceFields,
String stringPath)
sourceFields - of type FieldsstringPath - of type String
public Hfs(Fields sourceFields,
String stringPath,
boolean deleteOnSinkInit)
sourceFields - of type FieldsstringPath - of type StringdeleteOnSinkInit - of type boolean
public Hfs(Scheme scheme,
String stringPath)
scheme - of type SchemestringPath - of type String
public Hfs(Scheme scheme,
String stringPath,
boolean deleteOnSinkInit)
scheme - of type SchemestringPath - of type StringdeleteOnSinkInit - of type boolean| Method Detail |
|---|
protected void setStringPath(String stringPath)
protected void setUriScheme(URI uriScheme)
protected URI getURIScheme(JobConf jobConf)
throws IOException
IOException
protected URI makeURIScheme(JobConf jobConf)
throws IOException
IOExceptionpublic boolean isUseTapCollector()
TapTapCollector should be used to sink values.
isUseTapCollector in class Tap
protected FileSystem getDefaultFileSystem(JobConf jobConf)
throws IOException
IOException
protected FileSystem getFileSystem(JobConf jobConf)
throws IOException
IOExceptionpublic Path getPath()
Tap
getPath in class TapTap.getPath()
public Path getQualifiedPath(JobConf conf)
throws IOException
Tap
getQualifiedPath in class Tapconf - of type JobConf
IOException - whenpublic boolean isDeleteOnSinkInit()
Tap
isDeleteOnSinkInit in class TapTap.isDeleteOnSinkInit()
public void sourceInit(JobConf conf)
throws IOException
Tap
sourceInit in class Tapconf - of type JobConf
IOException - on resource initialization failure.
public void sinkInit(JobConf conf)
throws IOException
Tap
sinkInit in class Tapconf - of type JobConf
IOException - on resource initialization failure.
public boolean makeDirs(JobConf conf)
throws IOException
Tap
makeDirs in class Tapconf - of type JobConf
IOException - when there is an error making directories
public boolean deletePath(JobConf conf)
throws IOException
Tap
deletePath in class Tapconf - of type JobConf
IOException - when the resource cannot be deleted
public boolean pathExists(JobConf conf)
throws IOException
Tap
pathExists in class Tapconf - of type JobConf
IOException - when the status cannot be determined
public long getPathModified(JobConf conf)
throws IOException
Tap
getPathModified in class Tapconf - of type JobConf
IOException - when the modified date cannot be determined
public boolean containsFile(JobConf conf,
String currentFile)
Tap
containsFile in class Tapconf - of type JobConfcurrentFile - of type String
protected Path getTempPath(JobConf conf)
protected String makeTemporaryPathDir(String name)
public String toString()
toString in class ObjectObject.toString()public boolean equals(Object object)
equals in class TapTap.equals(Object)public int hashCode()
hashCode in class TapTap.hashCode()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||