[
https://issues.apache.org/jira/browse/HADOOP-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13175673#comment-13175673
]
Harsh J commented on HADOOP-7910:
---------------------------------
This is a good addition.
Some comments on the common patch:
* Remove the TODO note, as I think it is fine if we skip the redundant "bytes"
'b' character. Instead, add to the javadocs of the getLongBytes method what is
the intended input supposed to look like for the method to work fine.
* The last test, you seem to call getInt instead of getLongBytes. I don't think
getLongBytes would throw a NumberFormatException, but I didn't really try. You
need to fix this.
If this method has a definitive input it expects, then it would be nice if it
also threw a very nice response out when it was not satisfied with the input
received.
Am not sure if the underlying StringUtils method spews out a proper message
users can understand (for instance, when they put in 100GB instead of 100G
despite documentation of the property downstream), but would be good to have
such a message as it helps when users misconfigure things up.
Could you add such an exception message and also test for it when you catch it,
in your last test?
Thanks!
> add configuration methods to handle human readable size values
> --------------------------------------------------------------
>
> Key: HADOOP-7910
> URL: https://issues.apache.org/jira/browse/HADOOP-7910
> Project: Hadoop Common
> Issue Type: Improvement
> Components: conf
> Reporter: Sho Shimauchi
> Assignee: Sho Shimauchi
> Priority: Minor
> Attachments: hadoop-7910.txt
>
>
> It's better to have a new configuration methods which handle human readable
> size values.
> For example, see HDFS-1314.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira