[ https://issues.apache.org/jira/browse/HDFS-15412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17296318#comment-17296318 ]
Ayush Saxena commented on HDFS-15412: ------------------------------------- Thanx [~hadoop_yangyun] for the patch. Can you extract this into a method and may be instead of chaining, make it more readable by assigning to variables : {code:java} + this.scanPeriodMs = TimeUnit.MILLISECONDS.convert( + StorageType.getConfLong(datanode.getConf(), + ref.getVolume().getStorageType(), "scan.period.hours", + TimeUnit.HOURS.convert(conf.scanPeriodMs, TimeUnit.MILLISECONDS)), + TimeUnit.HOURS); + if (this.scanPeriodMs <= 0) { + this.scanPeriodMs = conf.scanPeriodMs; + } + {code} > Add options to set different block scan period for diffrent StorageType > ----------------------------------------------------------------------- > > Key: HDFS-15412 > URL: https://issues.apache.org/jira/browse/HDFS-15412 > Project: Hadoop HDFS > Issue Type: Improvement > Components: datanode > Reporter: Yang Yun > Assignee: Yang Yun > Priority: Minor > Attachments: HDFS-15412.001.patch, HDFS-15412.002.patch, > HDFS-15412.003.patch, HDFS-15412.004.patch > > > For some cold data, sometime, we don't want to scan cold data as often as > hot data. Add options that we can set the scan period time according to > StorageType. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org