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

Anu Engineer commented on HDFS-10821:
-------------------------------------

[~linyiqun] Thanks for quick turn around and the new patch.  I really 
appreciate you adding the new test that tests the invalid node. Don't you think 
if we find an invalid node, we should really print out an error message on the 
console ?. I was thinking that output of the test for line 6,7 should be 
something like "$InvalidNode not found. Please make sure that $InvalidNode 
exists in the cluster." That way user is aware that he/she has made a mistake. 
You might have to modify the getNodes function and return a list of invalid 
nodes or throw an exception and abort the whole operation, I am fine with 
either option. 

I don't think empty lines indicate an error condition to the user, so while 
this assertion technically correct, I am worried it does not offer the best 
user experience. 

{code}
// The 7th line should not contain invalid node's info and
    // should be empty.
    assertTrue(!outputs.get(6).contains(invalidNode)
        && outputs.get(6).isEmpty());
{code}

This is what I see on my console, which is kind of hard to decode on a shell. I 
think the user experience would be a silent failure.

{noformat}
outputs = {ArrayList@5593}  size = 7
 0 = "Processing report command"
 1 = "Reporting volume information for DataNode(s) 
'5c8a07de-7848-4c21-807f-ed6bba06c623,invalidNode'."
 2 = "127.0.0.1[127.0.0.1:50140] - <5c8a07de-7848-4c21-807f-ed6bba06c623>: 2 
volumes with node data density 0.00."
 3 = "[DISK: 
volume-/Users/aengineer/diskBalancer/hadoop-hdfs-project/hadoop-hdfs/target/test/data/dfs/data/data1]
 - 0.00 used: 4096/499077087232, 1.00 free: 499077083136/499077087232, 
isFailed: False, isReadOnly: False, isSkip: False, isTransient: False."
 4 = "[DISK: 
volume-/Users/aengineer/diskBalancer/hadoop-hdfs-project/hadoop-hdfs/target/test/data/dfs/data/data2]
 - 0.00 used: 4096/499077087232, 1.00 free: 499077083136/499077087232, 
isFailed: False, isReadOnly: False, isSkip: False, isTransient: False."
 5 = ""
 6 = ""
{noformat}

> DiskBalancer: Report command support with multiple nodes
> --------------------------------------------------------
>
>                 Key: HDFS-10821
>                 URL: https://issues.apache.org/jira/browse/HDFS-10821
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: balancer & mover
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>             Fix For: 2.9.0
>
>         Attachments: HDFS-10821.001.patch, HDFS-10821.002.patch
>
>
> Since HDFS-10813 has committed to the trunk, then we can use {{getNodes}} 
> method to parse the nodes string and support multiple nodes with {{hdfs 
> diskbalancer}} subcommands(ex -report, -query). In this JIRA, we are focusing 
> on the subcommand {{-report}}.
> That means we can use command {{hdfs diskbalancer -report -node}} to print 
> one or one more datanodes report info. A test input command(here I use UUID 
> to specify one datanode):
> {code}
> hdfs diskbalancer -report -node 
> e05ade8e-fb28-42cf-9aa9-43e564c0ec99,38714337-84fb-4e35-9ea3-0bb47d6da700
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to