public class HDFSFile
extends org.openstreetmap.atlas.streaming.resource.AbstractWritableResource
| Constructor and Description |
|---|
HDFSFile(org.apache.hadoop.fs.Path path) |
HDFSFile(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration configuration) |
HDFSFile(java.lang.String path) |
HDFSFile(java.lang.String path,
org.apache.hadoop.conf.Configuration configuration) |
HDFSFile(java.lang.String server,
int port,
java.lang.String path) |
HDFSFile(java.lang.String server,
int port,
java.lang.String path,
org.apache.hadoop.conf.Configuration configuration) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists() |
org.apache.hadoop.fs.Path |
getPath() |
int |
getRetries() |
org.openstreetmap.atlas.utilities.scalars.Duration |
getRetryWait() |
boolean |
isAppendToFile() |
boolean |
isDirectory() |
long |
length() |
void |
mkdirs(boolean clean) |
protected java.io.InputStream |
onRead() |
protected java.io.OutputStream |
onWrite() |
void |
remove(boolean recursive)
CAUTION: Please use this wisely in case of removing directories recursively
|
void |
setAppendToFile(boolean appendToFile) |
void |
setRetries(int retries) |
void |
setRetryWait(org.openstreetmap.atlas.utilities.scalars.Duration retryWait) |
getCompressor, setCompressor, writegetDecompressor, getName, read, setDecompressor, setName, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic HDFSFile(org.apache.hadoop.fs.Path path)
throws java.io.IOException
java.io.IOExceptionpublic HDFSFile(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration configuration)
throws java.io.IOException
java.io.IOExceptionpublic HDFSFile(java.lang.String path)
throws java.io.IOException
java.io.IOExceptionpublic HDFSFile(java.lang.String path,
org.apache.hadoop.conf.Configuration configuration)
throws java.io.IOException
java.io.IOExceptionpublic HDFSFile(java.lang.String server,
int port,
java.lang.String path)
throws java.net.URISyntaxException,
java.io.IOException
java.net.URISyntaxExceptionjava.io.IOExceptionpublic HDFSFile(java.lang.String server,
int port,
java.lang.String path,
org.apache.hadoop.conf.Configuration configuration)
throws java.net.URISyntaxException,
java.io.IOException
java.net.URISyntaxExceptionjava.io.IOExceptionpublic boolean exists()
public org.apache.hadoop.fs.Path getPath()
public int getRetries()
public org.openstreetmap.atlas.utilities.scalars.Duration getRetryWait()
public boolean isAppendToFile()
public boolean isDirectory()
public long length()
length in interface org.openstreetmap.atlas.streaming.resource.Resourcelength in class org.openstreetmap.atlas.streaming.resource.AbstractResourcepublic void mkdirs(boolean clean)
public void remove(boolean recursive)
recursive - true to recursively delete a directorypublic void setAppendToFile(boolean appendToFile)
public void setRetries(int retries)
public void setRetryWait(org.openstreetmap.atlas.utilities.scalars.Duration retryWait)
protected java.io.InputStream onRead()
onRead in class org.openstreetmap.atlas.streaming.resource.AbstractResourceprotected java.io.OutputStream onWrite()
onWrite in class org.openstreetmap.atlas.streaming.resource.AbstractWritableResource