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

Xiaoyu Yao commented on HADOOP-12824:
-------------------------------------

Thanks [~elgoiri] for updating the patch and adding the unit tests.
One NIT: you can eliminate local variable *totalFound* by break out of the loop 
if "_Total" is ever found from the returned items. 

{code}
256             for (i = 0; i < dwItemCount; i++) {
257               if (wcscmp(L"_Total", pItems[i].szName) == 0) { 
259                 *ret = pItems[i].RawValue.FirstValue;
                    break;
260               } else {
261                 *ret += pItems[i].RawValue.FirstValue;
262               }
263             }
{code}

> Collect network and disk usage on the node in Windows
> -----------------------------------------------------
>
>                 Key: HADOOP-12824
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12824
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 2.8.0
>            Reporter: Inigo Goiri
>            Assignee: Inigo Goiri
>         Attachments: HADOOP-12824-v000.patch, HADOOP-12824-v001.patch, 
> HADOOP-12824-v002.patch, HADOOP-12824-v003.patch
>
>
> HADOOP-12210 collects the node network usage for Linux; this JIRA does it for 
> Windows.



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

Reply via email to