hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mingliang Liu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-11359) DFSAdmin report command supports displaying maintenance state datanodes
Date Tue, 30 May 2017 22:45:05 GMT

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

Mingliang Liu commented on HDFS-11359:


Minor comments:

# {{printDataNodeReports()}} can either be static, or use {{getFs()}} to get the FS object
to avoid dfs parameter.
# The initial {{putNodeToService()}} seems unnecessary as the node status should be normal
I think.
1154	    for (DataNode dn : getCluster().getDataNodes()) {
1155	      hosts.add(dn.getDisplayName());
1156	      putNodeInService(0, dn.getDatanodeUuid());
1157	    }
Can we change this part to {{ToolRunner.run(dfsAdmin, new String[] \{"-report", "-inmaintenance",
 "-enteringmaintenance"});}} and assert out does not contain either of the two DNs?
# {{List<String> hosts = new ArrayList<>();}} in test, this is never used?
# simpler assert statements:
        is(allOf(containsString("Entering maintenance datanodes (1):"),
    assertThat(out.toString(), is(allOf(
        containsString("Entering maintenance datanodes (1):"),
The other place is similar.
# To clear the old out/err,
    // reset stream
    out = new ByteArrayOutputStream();
    err = new ByteArrayOutputStream();
    System.setOut(new PrintStream(out));
    System.setErr(new PrintStream(err));
    // reset stream

> 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

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

View raw message