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-11359) DFSAdmin report command supports displaying maintenance state datanodes
Date Fri, 26 May 2017 23:04:04 GMT

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

Manoj Govindassamy commented on HDFS-11359:
-------------------------------------------

[~linyiqun],
  Thanks for the patch revision. Looks good overall. Took one more look at the v03 patch and
here are few comments. Sorry, I missed them last time.
{{TestMaintenanceState#testReportMaintenanceNodes}}
1. The state transition for the DataNode is not controlled. The test first checks for Entering_Maintenance
and then In_Imaintenance on best efforts. But on the slower machines or if the test happens
to run the check much slower than the internal state transition then there is a chance that
test might miss seeing the Entering Maintenance state, leading to test timeout. One way to
solve the problem is to write some files and make sure the DataNode in interest (here index
0) cannot transition to the next state unless a new DataNode is added to the cluster. Just
trying to make sure the test will not become flaky down the line. Your thoughts, please?

2. We do have an util {{waitNodeState}} in the base test class to wait for DataNode to reach
a specific state. Please see if you can make use of the util for the below blocks. 
{noformat}
      // Verify nodes for DatanodeReportType.ENTERING_MAINTENANCE state
      while (fsn.getNumEnteringMaintenanceDataNodes() <= 0) {
        LOG.info("Waiting for a node to Enter Maintenance state!");
        Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
      }
      assertEquals(1, fsn.getNumEnteringMaintenanceDataNodes());

      ... ....

     GenericTestUtils.waitFor(new Supplier<Boolean>() {
        ...
      }, 1000, 60000);
{noformat}
can be replaced with something like below ?
{noformat}
      waitNodeState(cluster.getDataNodes().get(0), AdminStates.ENTERING_MAINTENANCE));
      assertEquals(1, fsn.getNumEnteringMaintenanceDataNodes());
{noformat}

3. In the below block, good that you are checking for all True Positive cases. Shall we also
verify the True Negative cases? That is, "dfsadmin -report -inmaintenance" command should
not list any DataNodes other than index 0.
{noformat}
      assertThat(out.toString(), is(allOf(
          containsString("In maintenance datanodes (1):"),
          containsString(cluster.getDataNodes().get(0).getDisplayName()))));
{noformat}

> DFSAdmin report command supports displaying maintenance state datanodes
> -----------------------------------------------------------------------
>
>                 Key: HDFS-11359
>                 URL: https://issues.apache.org/jira/browse/HDFS-11359
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, namenode
>    Affects Versions: 3.0.0-alpha1
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>            Priority: Minor
>         Attachments: HDFS-11359.001.patch, HDFS-11359.002.patch, HDFS-11359.003.patch
>
>
> The datanode's maintenance state info can be showed in webUI/JMX. But it can't be displayed
via CLI. This JIRA will improve on this.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
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