增加hdfs代码注释

This commit is contained in:
LingZhaoHui 2024-03-31 21:39:21 +08:00
parent 8d242458e9
commit 8bf19a216c
Signed by: zeekling
GPG Key ID: D96E4E75267CA2CC
3 changed files with 5 additions and 0 deletions

View File

@ -201,6 +201,9 @@ private static INodeDirectory createRoot(FSNamesystem namesystem) {
private final String supergroup; private final String supergroup;
private final INodeId inodeId; private final INodeId inodeId;
/**
* 写editlog
*/
private final FSEditLog editLog; private final FSEditLog editLog;
private HdfsFileStatus[] reservedStatuses; private HdfsFileStatus[] reservedStatuses;

View File

@ -1233,6 +1233,7 @@ private void loadFSImage(StartupOption startOpt) throws IOException {
writeLock(); writeLock();
try { try {
// We shouldn't be calling saveNamespace if we've come up in standby state. // We shouldn't be calling saveNamespace if we've come up in standby state.
// 根据启动选项及其对应存储目录(${dfs.name.dir})分析存储目录必要的话从先前的事务恢复过来
MetaRecoveryContext recovery = startOpt.createRecoveryContext(); MetaRecoveryContext recovery = startOpt.createRecoveryContext();
final boolean staleImage final boolean staleImage
= fsImage.recoverTransitionRead(startOpt, this, recovery); = fsImage.recoverTransitionRead(startOpt, this, recovery);

View File

@ -34,6 +34,7 @@
@InterfaceStability.Unstable @InterfaceStability.Unstable
public abstract class INodeAttributeProvider { public abstract class INodeAttributeProvider {
// 访问控制执行者接口
public static class AuthorizationContext { public static class AuthorizationContext {
private String fsOwner; private String fsOwner;
private String supergroup; private String supergroup;