public final class DistributedFileSystem extends FileSystem
FileSystem.FSKey, FileSystem.WriteMode| Constructor and Description |
|---|
DistributedFileSystem()
Creates a new DistributedFileSystem object to access HDFS
|
| Modifier and Type | Method and Description |
|---|---|
FSDataOutputStream |
create(Path f,
boolean overwrite) |
FSDataOutputStream |
create(Path f,
boolean overwrite,
int bufferSize,
short replication,
long blockSize) |
boolean |
delete(Path f,
boolean recursive) |
long |
getDefaultBlockSize() |
BlockLocation[] |
getFileBlockLocations(FileStatus file,
long start,
long len) |
FileStatus |
getFileStatus(Path f) |
static org.apache.hadoop.conf.Configuration |
getHadoopConfiguration()
Returns a new Hadoop Configuration object using the path to the hadoop conf configured
in the main configuration (flink-conf.yaml).
|
URI |
getUri() |
Path |
getWorkingDirectory() |
void |
initialize(URI path) |
boolean |
isDistributedFS() |
FileStatus[] |
listStatus(Path f) |
boolean |
mkdirs(Path f) |
FSDataInputStream |
open(Path f) |
FSDataInputStream |
open(Path f,
int bufferSize) |
boolean |
rename(Path src,
Path dst) |
exists, get, getLocalFileSystem, getNumberOfBlocks, initOutPathDistFS, initOutPathLocalFSpublic DistributedFileSystem()
throws IOException
IOException - throw if the required HDFS classes cannot be instantiatedpublic static org.apache.hadoop.conf.Configuration getHadoopConfiguration()
public Path getWorkingDirectory()
getWorkingDirectory in class FileSystempublic URI getUri()
getUri in class FileSystempublic void initialize(URI path) throws IOException
initialize in class FileSystemIOExceptionpublic FileStatus getFileStatus(Path f) throws IOException
getFileStatus in class FileSystemIOExceptionpublic BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException
getFileBlockLocations in class FileSystemIOExceptionpublic FSDataInputStream open(Path f, int bufferSize) throws IOException
open in class FileSystemIOExceptionpublic FSDataInputStream open(Path f) throws IOException
open in class FileSystemIOExceptionpublic FSDataOutputStream create(Path f, boolean overwrite, int bufferSize, short replication, long blockSize) throws IOException
create in class FileSystemIOExceptionpublic FSDataOutputStream create(Path f, boolean overwrite) throws IOException
create in class FileSystemIOExceptionpublic boolean delete(Path f, boolean recursive) throws IOException
delete in class FileSystemIOExceptionpublic FileStatus[] listStatus(Path f) throws IOException
listStatus in class FileSystemIOExceptionpublic boolean mkdirs(Path f) throws IOException
mkdirs in class FileSystemIOExceptionpublic boolean rename(Path src, Path dst) throws IOException
rename in class FileSystemIOExceptionpublic long getDefaultBlockSize()
getDefaultBlockSize in class FileSystempublic boolean isDistributedFS()
isDistributedFS in class FileSystemCopyright © 2014 The Apache Software Foundation. All rights reserved.