Java org.apache.hadoop.hdfs DFSClient fields, constructors, methods, implement or subclass

Example usage for Java org.apache.hadoop.hdfs DFSClient fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.hadoop.hdfs DFSClient.

The text is from its open source code.

Constructor

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);

Method

voidclose()
Close the file system, abandoning all of the leases and files being created and close connections to the namenode.
OutputStreamcreate(String src, boolean overwrite)
Call #create(String,boolean,short,long,Progressable) with default replication and blockSize and null progress.
DatanodeInfo[]datanodeReport(DatanodeReportType type)
booleandelete(String src, boolean recursive)
delete file or directory.
booleanexists(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.
DfsClientConfgetConf()
longgetCorruptBlocksCount()
Returns count of blocks with at least one replica marked corrupt.
intgetDatanodeReadTimeout(int numNodes)
DatanodeStorageReport[]getDatanodeStorageReport(DatanodeReportType type)
CachingStrategygetDefaultReadCachingStrategy()
CachingStrategygetDefaultWriteCachingStrategy()
FsStatusgetDiskStatus()
HdfsFileStatusgetFileInfo(String src)
Get the file info for a specific file or directory.
DFSInotifyEventInputStreamgetInotifyEventStream()
LocatedBlocksgetLocatedBlocks(String src, long start, long length)
longgetMissingBlocksCount()
Returns count of blocks with no good replicas left.
SocketAddressgetRandomLocalInterfaceAddr()
Select one of the configured local interfaces at random.
DirectoryListinglistPaths(String src, byte[] startAfter)
Get a partial listing of the indicated directory No block locations need to be fetched
booleanmkdirs(String src)
DFSInputStreamopen(String src)
voidsetTimes(String src, long mtime, long atime)
set the modification and access time of a file