|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hdfs.server.namenode.FSDirectory
public class FSDirectory
FSDirectory stores the filesystem directory state. It handles writing/loading values to disk, and logging changes as we go. It keeps the filename->blockset mapping always-current and logged to disk.
| Field Summary | |
|---|---|
static byte[] |
DOT_INODES
|
static String |
DOT_INODES_STRING
|
static byte[] |
DOT_RESERVED
|
static String |
DOT_RESERVED_PATH_PREFIX
|
static String |
DOT_RESERVED_STRING
|
| Method Summary | |
|---|---|
void |
addToInodeMap(org.apache.hadoop.hdfs.server.namenode.INode inode)
This method is always called with writeLock of FSDirectory held. |
void |
close()
Shutdown the filestore |
org.apache.hadoop.hdfs.server.namenode.INode |
getInode(long id)
Get the inode from inodeMap based on its inode id. |
org.apache.hadoop.hdfs.server.namenode.INode |
getINode(String src)
Get INode associated with the file / directory. |
org.apache.hadoop.hdfs.server.namenode.INode |
getINode4Write(String src)
Get INode associated with the file / directory. |
INodeMap |
getINodeMap()
|
INodesInPath |
getINodesInPath4Write(String src)
Get INode associated with the file / directory. |
INodesInPath |
getLastINodeInPath(String src)
Get INode associated with the file / directory. |
INodeDirectoryWithQuota |
getRoot()
|
static boolean |
isReservedName(org.apache.hadoop.hdfs.server.namenode.INode inode)
Check if a given inode name is reserved |
static boolean |
isReservedName(String src)
Check if a given path is reserved |
void |
removeFromInodeMap(List<? extends org.apache.hadoop.hdfs.server.namenode.INode> inodes)
This method is always called with writeLock of FSDirectory held. |
protected void |
setReady(boolean flag)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DOT_RESERVED_STRING
public static final String DOT_RESERVED_PATH_PREFIX
public static final byte[] DOT_RESERVED
public static final String DOT_INODES_STRING
public static final byte[] DOT_INODES
| Method Detail |
|---|
public INodeDirectoryWithQuota getRoot()
protected void setReady(boolean flag)
public void close()
throws IOException
close in interface CloseableIOException
public org.apache.hadoop.hdfs.server.namenode.INode getINode(String src)
throws org.apache.hadoop.fs.UnresolvedLinkException
INode associated with the file / directory.
org.apache.hadoop.fs.UnresolvedLinkException
public INodesInPath getLastINodeInPath(String src)
throws org.apache.hadoop.fs.UnresolvedLinkException
INode associated with the file / directory.
org.apache.hadoop.fs.UnresolvedLinkException
public INodesInPath getINodesInPath4Write(String src)
throws org.apache.hadoop.fs.UnresolvedLinkException,
SnapshotAccessControlException
INode associated with the file / directory.
org.apache.hadoop.fs.UnresolvedLinkException
SnapshotAccessControlException
public org.apache.hadoop.hdfs.server.namenode.INode getINode4Write(String src)
throws org.apache.hadoop.fs.UnresolvedLinkException,
SnapshotAccessControlException
INode associated with the file / directory.
SnapshotAccessControlException - if path is in RO snapshot
org.apache.hadoop.fs.UnresolvedLinkExceptionpublic INodeMap getINodeMap()
public final void addToInodeMap(org.apache.hadoop.hdfs.server.namenode.INode inode)
public final void removeFromInodeMap(List<? extends org.apache.hadoop.hdfs.server.namenode.INode> inodes)
public org.apache.hadoop.hdfs.server.namenode.INode getInode(long id)
id - The given id
public static boolean isReservedName(org.apache.hadoop.hdfs.server.namenode.INode inode)
public static boolean isReservedName(String src)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||