针对具体存储在hdfs上的文件有个对象来模型化他那就是INodeFile这个类,因为hdfs文件系统也是树形结构的,故衍生出一些其他类来模型化这些对象,见类图描述如下
INode
- /**
- * We keep an in-memory representation of the file/block hierarchy.
- * This is a base INode class containing common fields for file and
- * directory inodes.
- */
INodeFile
- hdfs中文件的描述形式,文件的静态属性描述
INodeFileUnderConstruction
- hdfs中文件的动态描述形式 例如租约持有期间的更新等,例如块的恢复等。
- clientName; // lease holder
- primaryNodeIndex = -1 ; //the node working on lease recovery
- DatanodeDescriptor[] targets = null ; //locations for last block
- long lastRecoveryTime
INodeDirectory
- /**
- * Directory INode class.
- */
INodeDirectoryWithQuota
- /**
- * Directory INode class that has a quota restriction
- */
DirCounts
- /** Simple wrapper for two counters :
- * nsCount (namespace consumed) and dsCount (diskspace consumed).
- */
更多信息请查看 java进阶网 http://www.javady.com