[
https://issues.apache.org/jira/browse/HADOOP-12211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Douglas updated HADOOP-12211:
-----------------------------------
Attachment: HADOOP-12211.003.patch
Changes in v3:
* Added synchronized block around updating sector size in the map. While the
thread safety for this class needs specific attention, the existing cases will
only return stale/inconsistent data. Errors that arise from adding elements to
a {{HashMap}} without synchronization (as in v2) are not benign (though
unlikely in this setting).
* The unit test assumes that {{/sys/block/sd\{a,c,e,f\}/queue/hw_sector_size}}
will either not exist or be 512 on the machine it's running on. That assumption
may not always hold. Updated the unit test to return a synthetic value for all
disks, though the parsing logic for the sector size could also be tested.
* The {{fReader}} param complicates the catch block unnecessarily. This matches
the rest of the class, so v3 keeps the pattern and just eliminates the variable.
Also cleaned up some checkstyle issues.
> Collect disks usages on the node
> --------------------------------
>
> Key: HADOOP-12211
> URL: https://issues.apache.org/jira/browse/HADOOP-12211
> Project: Hadoop Common
> Issue Type: Improvement
> Reporter: Robert Grandl
> Assignee: Robert Grandl
> Labels: yarn-common, yarn-util
> Attachments: HADOOP-12211-1.patch, HADOOP-12211-2.patch,
> HADOOP-12211.003.patch, YARN-3820-1.patch, YARN-3820-2.patch,
> YARN-3820-3.patch, YARN-3820-4.patch
>
>
> In this JIRA we propose to collect disks usages on a node. This JIRA is part
> of a larger effort of monitoring resource usages on the nodes.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)