hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manoj Govindassamy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-9391) Update webUI/JMX to display maintenance state info
Date Thu, 05 Jan 2017 19:41:58 GMT

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

Manoj Govindassamy commented on HDFS-9391:
------------------------------------------

Code References:

*BlockManager#checkReplicaOnStorage:*
* {code}
      } else if (node.isDecommissionInProgress()) {
        s = StoredReplicaState.DECOMMISSIONING;
      } else if (node.isDecommissioned()) {
        s = StoredReplicaState.DECOMMISSIONED;
      } else if (node.isMaintenance()) {
        if (node.isInMaintenance() || !node.isAlive()) {
          s = StoredReplicaState.MAINTENANCE_NOT_FOR_READ;
        } else {
          s = StoredReplicaState.MAINTENANCE_FOR_READ;
        }
      } else if (isExcess(node, b)) {
        s = StoredReplicaState.EXCESS;
      } else {
        s = StoredReplicaState.LIVE;
      }
      counters.add(s, 1);
{code}

*DecommissionManager#Monitor#processBlocksInternal:*
* {code}
        if ((liveReplicas == 0) &&
            (num.decommissionedAndDecommissioning() > 0)) {
          decommissionOnlyReplicas++;
        }
        if ((liveReplicas == 0) && (num.maintenanceReplicas() > 0)) {
          maintenanceOnlyReplicas++;
        }
        if ((liveReplicas == 0) && (num.outOfServiceReplicas() > 0)) {
          outOfServiceOnlyReplicas++;
        }
{code}

*NumberReplicas:*
* {code}

  public int decommissionedAndDecommissioning() {
    return decommissioned() + decommissioning();
  }

  public int maintenanceReplicas() {
    return (int) (get(MAINTENANCE_NOT_FOR_READ) + get(MAINTENANCE_FOR_READ));
  }

  public int outOfServiceReplicas() {
    return maintenanceReplicas() + decommissionedAndDecommissioning();
  }

{code}

> Update webUI/JMX to display maintenance state info
> --------------------------------------------------
>
>                 Key: HDFS-9391
>                 URL: https://issues.apache.org/jira/browse/HDFS-9391
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>    Affects Versions: 3.0.0-alpha1
>            Reporter: Ming Ma
>            Assignee: Manoj Govindassamy
>         Attachments: HDFS-9391-MaintenanceMode-WebUI.pdf, HDFS-9391.01.patch, HDFS-9391.02.patch,
Maintenance webUI.png
>
>




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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message