Author: harsh
Date: Sun May 13 03:33:19 2012
New Revision: 1337761
URL: http://svn.apache.org/viewvc?rev=1337761&view=rev
Log:
HDFS-2312. FSNamesystem javadoc incorrectly says its for DNs. (harsh)
Modified:
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1337761&r1=1337760&r2=1337761&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Sun May 13
03:33:19 2012
@@ -141,6 +141,8 @@ Trunk (unreleased changes)
HDFS-3243. TestParallelRead timing out on jenkins. (Henry Robinson via
todd)
HDFS-3265. PowerPc Build error. (Kumar Ravi via mattf)
+
+ HDFS-2312. FSNamesystem javadoc incorrectly says its for DNs. (harsh)
Release 2.0.0 - UNRELEASED
Modified:
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
URL:
http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java?rev=1337761&r1=1337760&r2=1337761&view=diff
==============================================================================
---
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
(original)
+++
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
Sun May 13 03:33:19 2012
@@ -197,18 +197,33 @@ import com.google.common.annotations.Vis
import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
-/***************************************************
- * FSNamesystem does the actual bookkeeping work for the
- * DataNode.
+/**
+ * FSNamesystem is a container of both transient
+ * and persisted name-space state, and does all the book-keeping
+ * work on a NameNode.
*
- * It tracks several important tables.
+ * Its roles are briefly described below:
*
- * 1) valid fsname --> blocklist (kept on disk, logged)
+ * 1) Is the container for BlockManager, DatanodeManager,
+ * DelegationTokens, LeaseManager, etc. services.
+ * 2) RPC calls that modify or inspect the name-space
+ * should get delegated here.
+ * 3) Anything that touches only blocks (eg. block reports),
+ * it delegates to BlockManager.
+ * 4) Anything that touches only file information (eg. permissions, mkdirs),
+ * it delegates to FSDirectory.
+ * 5) Anything that crosses two of the above components should be
+ * coordinated here.
+ * 6) Logs mutations to FSEditLog.
+ *
+ * This class and its contents keep:
+ *
+ * 1) Valid fsname --> blocklist (kept on disk, logged)
* 2) Set of all valid blocks (inverted #1)
* 3) block --> machinelist (kept in memory, rebuilt dynamically from reports)
* 4) machine --> blocklist (inverted #2)
* 5) LRU cache of updated-heartbeat machines
- ***************************************************/
+ */
@InterfaceAudience.Private
@Metrics(context="dfs")
public class FSNamesystem implements Namesystem, FSClusterStats,