You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Chris Douglas (JIRA)" <ji...@apache.org> on 2016/09/01 01:25:21 UTC
[jira] [Updated] (HDFS-9847) HDFS configuration without time unit
name should accept friendly time units
[ https://issues.apache.org/jira/browse/HDFS-9847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Douglas updated HDFS-9847:
--------------------------------
Attachment: HDFS-9847.007.patch
Rebased nothrow.004 as .007 and added a unit test for the warnings (I'm still skeptical these belong in Configuration rather than the caller, but I'll yield to the prevailing taste consensus).
+1, except the following change is too pessimistic:
{noformat}
+ long raw = Long.parseLong(vStr);
+ long converted = unit.convert(raw, vUnit.unit());
+ if (vUnit.unit().convert(converted, unit) != raw) {
+ LOG_DEPRECATION.info("Loss of precision converting " + vStr
+ + vUnit.suffix() + " to " + unit + " for " + name);
+ }
+ return converted;
{noformat}
Only conversions to coarser units lose precision e.g., from millis to seconds. Pedantically, one isn't losing precision specifying 3000ms converting to seconds, but we can ignore that. The unit test verifies this. [~linyiqun] does this look OK to you?
> HDFS configuration without time unit name should accept friendly time units
> ---------------------------------------------------------------------------
>
> Key: HDFS-9847
> URL: https://issues.apache.org/jira/browse/HDFS-9847
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Affects Versions: 2.7.1
> Reporter: Yiqun Lin
> Assignee: Yiqun Lin
> Attachments: HDFS-9847-branch-2.001.patch, HDFS-9847-branch-2.002.patch, HDFS-9847-nothrow.001.patch, HDFS-9847-nothrow.002.patch, HDFS-9847-nothrow.003.patch, HDFS-9847-nothrow.004.patch, HDFS-9847.001.patch, HDFS-9847.002.patch, HDFS-9847.003.patch, HDFS-9847.004.patch, HDFS-9847.005.patch, HDFS-9847.006.patch, HDFS-9847.007.patch, branch-2-delta.002.txt, timeduration-w-y.patch
>
>
> In HDFS-9821, it talks about the issue of leting existing keys use friendly units e.g. 60s, 5m, 1d, 6w etc. But there are som configuration key names contain time unit name, like {{dfs.blockreport.intervalMsec}}, so we can make some other configurations which without time unit name to accept friendly time units. The time unit {{seconds}} is frequently used in hdfs. We can updating this configurations first.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org