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

Palakur Eshwitha Sai commented on HDFS-17233:
---------------------------------------------

When the optional property dfs.datanode.lifeline.interval.seconds is 
configured, its time unit is not being considered as seconds.
As per the documentation, the property value has to be given in seconds.

{quote}long confLifelineIntervalMs =
     getConf().getLong(DFS_DATANODE_LIFELINE_INTERVAL_SECONDS_KEY,
     3 * getConf().getTimeDuration(DFS_HEARTBEAT_INTERVAL_KEY,
     DFS_HEARTBEAT_INTERVAL_DEFAULT, TimeUnit.SECONDS,
         TimeUnit.MILLISECONDS)); \{quote}

In this portion of the code, the getLong method is called which takes the 
property name and default value. It retrieves the property value if configured, 
else returns the default value provided. 

The conversion to ms is happening in the default value case, but if the value 
of the property is set, it is retrieved and returned as it is by the getLong 
method (in seconds).

> The conf dfs.datanode.lifeline.interval.seconds is not considering time unit 
> seconds
> ------------------------------------------------------------------------------------
>
>                 Key: HDFS-17233
>                 URL: https://issues.apache.org/jira/browse/HDFS-17233
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: datanode
>            Reporter: Hemanth Boyina
>            Assignee: Palakur Eshwitha Sai
>            Priority: Major
>              Labels: pull-request-available
>
> {code:java}
> long confLifelineIntervalMs =
>     getConf().getLong(DFS_DATANODE_LIFELINE_INTERVAL_SECONDS_KEY,
>     3 * getConf().getTimeDuration(DFS_HEARTBEAT_INTERVAL_KEY,
>     DFS_HEARTBEAT_INTERVAL_DEFAULT, TimeUnit.SECONDS,
>         TimeUnit.MILLISECONDS)); {code}
> if we configure DFS_DATANODE_LIFELINE_INTERVAL_SECONDS_KEY, the value is not 
> converting to Ms. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to