[ 
https://issues.apache.org/jira/browse/HDFS-7894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14350728#comment-14350728
 ] 

Kihwal Lee commented on HDFS-7894:
----------------------------------

It won't work because of {{checkSuperuserPrivilege()}} and {{checkOperation()}}.
What do you think about something like following? I didn't try to compile or 
test this code. Adding a test case would be nice, if possible.
{code:java}
    if (!isRollingUpgrade()) {
      return null; // this is the common case.
    }
    readLock();
    // check again after acquiring the read lock.
    RollingUpgradeInfo upgradeInfo = getRollingUpgradeInfo();
    if (upgradeInfo == null) {
      return null;
    }
    try {
      boolean hasRollbackImage = this.getFSImage().hasRollbackFSImage();
      upgradeInfo.setCreatedRollbackImages(hasRollbackImage);
    } finally {
      readUnlock();
    }
    return new RollingUpgradeInfo.Bean(upgradeInfo);
{code}

> Rolling upgrade readiness is not updated in jmx until query command is issued.
> ------------------------------------------------------------------------------
>
>                 Key: HDFS-7894
>                 URL: https://issues.apache.org/jira/browse/HDFS-7894
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Kihwal Lee
>            Assignee: Brahma Reddy Battula
>            Priority: Critical
>         Attachments: HDFS-7894.patch
>
>
> When a hdfs rolling upgrade is started and a rollback image is 
> created/uploaded, the active NN does not update its {{rollingUpgradeInfo}} 
> until it receives a query command via RPC. This results in inconsistent info 
> being showing up in the web UI and its jmx page.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to