public final class MapRFileSystem extends FileSystem
FileSystem
base class for the MapR
file system. The class contains MapR specific code to initialize the
connection to the file system. Apart from that, we code mainly reuses the
existing HDFS wrapper code.FileSystem.FSKey, FileSystem.WriteMode
Constructor and Description |
---|
MapRFileSystem()
Creates a new MapRFileSystem object to access the MapR file system.
|
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) |
Path |
getHomeDirectory() |
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, initOutPathDistFS, initOutPathLocalFS, setDefaultScheme
public MapRFileSystem() throws IOException
IOException
- throw if the required MapR classes cannot be foundpublic Path getWorkingDirectory()
getWorkingDirectory
in class FileSystem
public Path getHomeDirectory()
getHomeDirectory
in class FileSystem
public URI getUri()
getUri
in class FileSystem
public void initialize(URI path) throws IOException
initialize
in class FileSystem
IOException
public FileStatus getFileStatus(Path f) throws IOException
getFileStatus
in class FileSystem
IOException
public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException
getFileBlockLocations
in class FileSystem
IOException
public FSDataInputStream open(Path f, int bufferSize) throws IOException
open
in class FileSystem
IOException
public FSDataInputStream open(Path f) throws IOException
open
in class FileSystem
IOException
public FSDataOutputStream create(Path f, boolean overwrite, int bufferSize, short replication, long blockSize) throws IOException
create
in class FileSystem
IOException
public FSDataOutputStream create(Path f, boolean overwrite) throws IOException
create
in class FileSystem
IOException
public boolean delete(Path f, boolean recursive) throws IOException
delete
in class FileSystem
IOException
public FileStatus[] listStatus(Path f) throws IOException
listStatus
in class FileSystem
IOException
public boolean mkdirs(Path f) throws IOException
mkdirs
in class FileSystem
IOException
public boolean rename(Path src, Path dst) throws IOException
rename
in class FileSystem
IOException
public long getDefaultBlockSize()
getDefaultBlockSize
in class FileSystem
public boolean isDistributedFS()
isDistributedFS
in class FileSystem
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.