public class UnderFileSystemHdfs extends UnderFileSystem
UnderFileSystem.SpaceType
Modifier and Type | Method and Description |
---|---|
void |
close() |
org.apache.hadoop.fs.FSDataOutputStream |
create(String path) |
org.apache.hadoop.fs.FSDataOutputStream |
create(String path,
int blockSizeByte) |
org.apache.hadoop.fs.FSDataOutputStream |
create(String path,
short replication,
int blockSizeByte) |
boolean |
delete(String path,
boolean recursive) |
boolean |
exists(String path) |
long |
getBlockSizeByte(String path) |
static UnderFileSystemHdfs |
getClient(String path) |
List<String> |
getFileLocations(String path) |
List<String> |
getFileLocations(String path,
long offset) |
long |
getFileSize(String path) |
long |
getModificationTimeMs(String path) |
long |
getSpace(String path,
UnderFileSystem.SpaceType type) |
boolean |
isFile(String path) |
String[] |
list(String path)
List all the files in the folder.
|
boolean |
mkdirs(String path,
boolean createParent) |
org.apache.hadoop.fs.FSDataInputStream |
open(String path) |
boolean |
rename(String src,
String dst) |
void |
toFullPermission(String path) |
get
public static UnderFileSystemHdfs getClient(String path)
public void toFullPermission(String path)
toFullPermission
in class UnderFileSystem
public void close() throws IOException
close
in class UnderFileSystem
IOException
public org.apache.hadoop.fs.FSDataOutputStream create(String path) throws IOException
create
in class UnderFileSystem
IOException
public org.apache.hadoop.fs.FSDataOutputStream create(String path, int blockSizeByte) throws IOException
create
in class UnderFileSystem
IOException
public org.apache.hadoop.fs.FSDataOutputStream create(String path, short replication, int blockSizeByte) throws IOException
create
in class UnderFileSystem
IOException
public boolean delete(String path, boolean recursive) throws IOException
delete
in class UnderFileSystem
IOException
public boolean exists(String path)
exists
in class UnderFileSystem
public String[] list(String path) throws IOException
UnderFileSystem
list
in class UnderFileSystem
path
- the path to list.IOException
public List<String> getFileLocations(String path)
getFileLocations
in class UnderFileSystem
public List<String> getFileLocations(String path, long offset)
getFileLocations
in class UnderFileSystem
public long getFileSize(String path)
getFileSize
in class UnderFileSystem
public long getBlockSizeByte(String path) throws IOException
getBlockSizeByte
in class UnderFileSystem
IOException
public long getModificationTimeMs(String path) throws IOException
getModificationTimeMs
in class UnderFileSystem
IOException
public long getSpace(String path, UnderFileSystem.SpaceType type) throws IOException
getSpace
in class UnderFileSystem
IOException
public boolean isFile(String path) throws IOException
isFile
in class UnderFileSystem
IOException
public boolean mkdirs(String path, boolean createParent)
mkdirs
in class UnderFileSystem
public org.apache.hadoop.fs.FSDataInputStream open(String path)
open
in class UnderFileSystem
public boolean rename(String src, String dst)
rename
in class UnderFileSystem
Copyright © 2014. All rights reserved.