[
https://issues.apache.org/jira/browse/HADOOP-5120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675439#action_12675439
]
Konstantin Shvachko commented on HADOOP-5120:
---------------------------------------------
+1.
A wish for future changes in this direction. In many cases it is not necessary
to pass the whole FSNamesystem class reference. If only FSImage of FSDirectory
is necessary please make constructors take exactly that. Like here, you could
have moved a call to FSNamesystem.leaveSafeMode() up to
FSNamesystem.processDistributedUpgradeCommand, and then UpgradeManagerNamenode
would need only FSImage.
I am trying to prevent mistakes which break the synchronization order. They are
very easy make if you have a direct reference to FSNamesystem.
> UpgradeManagerNamenode and UpgradeObjectNamenode should not use
> FSNamesystem.getFSNamesystem()
> ----------------------------------------------------------------------------------------------
>
> Key: HADOOP-5120
> URL: https://issues.apache.org/jira/browse/HADOOP-5120
> Project: Hadoop Core
> Issue Type: Sub-task
> Components: dfs
> Reporter: Tsz Wo (Nicholas), SZE
> Assignee: Tsz Wo (Nicholas), SZE
> Fix For: 0.21.0
>
> Attachments: 5120_20090202.patch
>
>
> UpgradeManagerNamenode and UpgradeObjectNamenode should not access the
> namespace by the static method FSNamesystem.getFSNamesystem()
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.