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

Lin Yiqun commented on HDFS-9847:
---------------------------------

Hi, [~chris.douglas], it has case that can use time unit week
{code}
<property>
  <name>dfs.datanode.scan.period.hours</name>
  <value>504</value>
  <description>
        If this is positive, the DataNode will not scan any
        individual block more than once in the specified scan period.
        If this is negative, the block scanner is disabled.
        If this is set to zero, then the default value of 504 hours
        or 3 weeks is used. Prior versions of HDFS incorrectly documented
        that setting this key to zero will disable the block scanner.
  </description>
</property>
{code}
Adding week and year in hadoop-common is wanting to support to more differnet 
units in subclassing(HBase, Hive , etc)rather just HDFS.

There are some places using timeSecondInterval variable in {{int}} type, so I 
define {{getIntTimeSeconds}} in Configuration. It nedd not cast type from long 
to int each time.
{code}
int interval = conf.getIntTimeSeconds(
        DFSConfigKeys.DFS_DATANODE_DIRECTORYSCAN_INTERVAL_KEY,
        DFSConfigKeys.DFS_DATANODE_DIRECTORYSCAN_INTERVAL_DEFAULT);
{code}

> 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: Lin Yiqun
>            Assignee: Lin Yiqun
>         Attachments: HDFS-9847.001.patch, HDFS-9847.002.patch, 
> 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)

Reply via email to