[
https://issues.apache.org/jira/browse/HDFS-12698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16269268#comment-16269268
]
Anu Engineer commented on HDFS-12698:
-------------------------------------
Thank you for getting this done, code readability in many places has improved
dramatically. I am fully convinced that we should use the
getTimeDuration/SetTimeDuration in all places where we use time. Especially the
improvement in reading config values like 10mins instead of some large value in
milliseconds is huge. So minor comments below. I am +1 after these are fixed.
* TestBlockDeletingService.java:Line 223:
conf.setInt(OZONE_BLOCK_DELETING_SERVICE_INTERVAL, 500); ==>
conf.setTimeDuration(OZONE_BLOCK_DELETING_SERVICE_INTERVAL, 500,
TimeUnit.MILLISECONDS);
* TestContainerReplicationManager.java:Line 111:
config.setInt(OZONE_SCM_CONTAINER_REPORTS_WAIT_TIMEOUT, 1); ==>
confing.setTimeDuration(OZONE_SCM_CONTAINER_REPORTS_WAIT_TIMEOUT, 1,
TimeUnit.SECONDS)
* TestNodeManager.java:Line 116:
conf.setLong(OZONE_SCM_HEARTBEAT_PROCESS_INTERVAL, 100);==>
conf.setTimeDuration(OZONE_SCM_HEARTBEAT_PROCESS_INTERVAL, 100,
TimeUnit.MILLISECONDS);
* TestNodeManager.java#testScmShutdown:Line249: conf.getTimeDuration -- Should
be *setTimeDuration*.
* TestNodeManager.java#testScmHeartbeatAfterRestart:Line 274:
conf.getTimeDuration -- Should be *setTimeDuration*.
* TestNodeManager.java#testScmLogsHeartbeatFlooding:Line 879:
conf.setInt(OZONE_SCM_HEARTBEAT_PROCESS_INTERVAL, 500); ==>
conf.setTimeDuration(OZONE_SCM_HEARTBEAT_PROCESS_INTERVAL, 500,
TimeUnit.MILLISECONDS);
* TestStorageContainerManager.java#testBlockDeletionTransactions: Line 195:
conf.setInt(OzoneConfigKeys.OZONE_BLOCK_DELETING_SERVICE_INTERVAL, 1000); ==>
conf.setTimeDuration(OzoneConfigKeys.OZONE_BLOCK_DELETING_SERVICE_INTERVAL,
1000. TimeUnit.MILLISECONDS);
> Ozone: Use time units in the Ozone configuration values
> -------------------------------------------------------
>
> Key: HDFS-12698
> URL: https://issues.apache.org/jira/browse/HDFS-12698
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: ozone
> Affects Versions: HDFS-7240
> Reporter: Elek, Marton
> Assignee: Elek, Marton
> Attachments: HDFS-12698-HDFS-7240.001.patch,
> HDFS-12698-HDFS-7240.002.patch, HDFS-12698-HDFS-7240.003.patch,
> HDFS-12698-HDFS-7240.005.patch, HDFS-12698-HDFS-7240.006.patch
>
>
> In HDFS-9847 introduced a new way to configure the time related configuration
> with using time unit in the vaule (eg. 10s, 5m, ...).
> Because the new behavior I have seen a lot of warning during my tests:
> {code}
> 2017-10-19 18:35:19,955 [main] INFO Configuration.deprecation
> (Configuration.java:logDeprecation(1306)) - No unit for
> scm.container.client.idle.threshold(10000) assuming MILLISECONDS
> {code}
> So we need to add the time unit for every configuration. Unfortunately we
> have a few configuration parameter which includes the unit in the key name
> (eg dfs.cblock.block.buffer.flush.interval.seconds or
> ozone.container.report.interval.ms).
> I suggest to remove all the units from the key name and follow the new
> convention where any of the units could be used.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]