Example usage for Java org.apache.hadoop.hdfs DFSClient fields, constructors, methods, implement or subclass
The text is from its open source code.
DFSClient(InetSocketAddress address, Configuration conf) | |
DFSClient(URI nameNodeUri, Configuration conf) Same as this(nameNodeUri, conf, null); | |
DFSClient(Configuration conf) Same as this(NameNode.getNNAddress(conf), conf); |
void | close() Close the file system, abandoning all of the leases and files being created and close connections to the namenode. |
OutputStream | create(String src, boolean overwrite) Call #create(String,boolean,short,long,Progressable) with default replication and blockSize and null progress . |
DatanodeInfo[] | datanodeReport(DatanodeReportType type) |
boolean | delete(String src, boolean recursive) delete file or directory. |
boolean | exists(String src) Implemented using getFileInfo(src) |
BlockLocation[] | getBlockLocations(String src, long start, long length) Get block location info about file getBlockLocations() returns a list of hostnames that store data for a specific file region. |
DfsClientConf | getConf() |
long | getCorruptBlocksCount() Returns count of blocks with at least one replica marked corrupt. |
int | getDatanodeReadTimeout(int numNodes) |
DatanodeStorageReport[] | getDatanodeStorageReport(DatanodeReportType type) |
CachingStrategy | getDefaultReadCachingStrategy() |
CachingStrategy | getDefaultWriteCachingStrategy() |
FsStatus | getDiskStatus() |
HdfsFileStatus | getFileInfo(String src) Get the file info for a specific file or directory. |
DFSInotifyEventInputStream | getInotifyEventStream() |
LocatedBlocks | getLocatedBlocks(String src, long start, long length) |
long | getMissingBlocksCount() Returns count of blocks with no good replicas left. |
SocketAddress | getRandomLocalInterfaceAddr() Select one of the configured local interfaces at random. |
DirectoryListing | listPaths(String src, byte[] startAfter) Get a partial listing of the indicated directory No block locations need to be fetched |
boolean | mkdirs(String src) |
DFSInputStream | open(String src) |
void | setTimes(String src, long mtime, long atime) set the modification and access time of a file |