Example usage for Java org.apache.hadoop.hdfs DistributedFileSystem fields, constructors, methods, implement or subclass
The text is from its open source code.
FSDataOutputStream | append(Path f) Append to an existing file (optional operation). |
void | close() |
void | concat(Path trg, Path[] psrcs) Move blocks from srcs to trg and delete srcs afterwards. |
void | copyFromLocalFile(Path src, Path dst) The src file is on the local disk. |
FSDataOutputStream | create(Path f) Create an FSDataOutputStream at the indicated Path. |
FSDataOutputStream | create(Path f, boolean overwrite) Create an FSDataOutputStream at the indicated Path. |
void | createEncryptionZone(final Path path, final String keyName) |
boolean | createNewFile(Path f) Creates the given Path as a brand-new zero-length file. |
boolean | delete(Path f, final boolean recursive) |
void | deleteSnapshot(final Path snapshotDir, final String snapshotName) |
boolean | exists(Path f) Check if a path exists. |
FileSystem | get(Configuration conf) Returns the configured FileSystem implementation. |
DFSClient | getClient() |
Configuration | getConf() |
DatanodeInfo[] | getDataNodeStats() |
DatanodeInfo[] | getDataNodeStats(final DatanodeReportType type) |
Token | getDelegationToken(String renewer) |
FileStatus | getFileStatus(Path f) Returns the stat information about the file. |
SnapshottableDirectoryStatus[] | getSnapshottableDirListing() |
FsStatus | getStatus() Returns a status object describing the use and capacity of the filesystem. |
URI | getUri() |
FileStatus[] | globStatus(Path pathPattern) Return all the files that match filePattern and are not checksum files. |
void | initialize(URI uri, Configuration conf) |
boolean | isDirectory(Path f) True iff the named path is a directory. |
boolean | isFileClosed(final Path src) Get the close status of a file |
FileStatus[] | listStatus(Path p) List all the entries of a directory Note that this operation is not atomic for a large directory. |
FileStatus[] | listStatus(Path f, PathFilter filter) Filter files/directories in the given path using the user-supplied path filter. |
boolean | mkdirs(Path f) Call #mkdirs(Path,FsPermission) with default permission. |
boolean | mkdirs(Path f, FsPermission permission) Create a directory and its parent directories. |
FSDataInputStream | open(Path f) Opens an FSDataInputStream at the indicated Path. |
boolean | recoverLease(final Path f) Start the lease recovery of a file |
boolean | rename(Path src, Path dst) |
void | setPermission(Path p, final FsPermission permission) |
void | setQuota(Path src, final long namespaceQuota, final long storagespaceQuota) Set a directory's quotas |
boolean | setSafeMode(HdfsConstants.SafeModeAction action) Enter, leave or get safe mode. |