hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Foley (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-1726) query method for what kind of safe mode the Namenode is in
Date Sat, 26 Mar 2011 01:29:05 GMT

     [ https://issues.apache.org/jira/browse/HDFS-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Matt Foley updated HDFS-1726:

    Attachment: SafeModeState_v2.patch

Besides creating SafeModeState and a way to query it, this patch fixes two minor bugs found
during development:

- when entering manual mode via the SafeModeInfo() ctor, sets "reached" = -1.  This caused
an incorrect getTurnOffTip() result, because "reached == -1" is supposed to mean safe mode
is off, and it is not needed for manual mode detection, which relies on "extension = Integer.MAX_VALUE".
 Changed to set it to 0, consistent with being in safe mode (regardless of reason).

- safeMode.incrementSafeBlockCount() and safeMode.decrementSafeBlockCount() call checkMode()
on every call, regardless of whether they change anything that needs checkMode().  Changed
to only call checkMode() if they succeed in changing the blockSafe count.

Finally, found some inconsistencies in the use of "synchronized".  Opened ticket HDFS-1790
to clarify them.

> query method for what kind of safe mode the Namenode is in
> ----------------------------------------------------------
>                 Key: HDFS-1726
>                 URL: https://issues.apache.org/jira/browse/HDFS-1726
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: name-node
>    Affects Versions: 0.22.0
>            Reporter: Matt Foley
>            Assignee: Matt Foley
>             Fix For: 0.23.0
>         Attachments: SafeModeState_v2.patch
> If we could differentiate between "startup safemode" vs other safemode, it would be easier
to do startup optimizations like HDFS-1295.  Looking at FSNamesystem, this can be queried,
but not with a single query, and the semantics are not reliable under future changes.  Also,
the FSNamesystem code itself, internally, uses more than one way to test for manual safe mode.
> Proposal is to create a status field and query method in FSNamesystem with enum values
> If in the future we add automatic fallback to safe mode, we would add value SAFEMODE_AUTOMATIC.
> This change will make it easier to do startup optimizations, and will also allow making
the safemode management code in FSNamesystem simpler and more consistent.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message