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 "Palakur Eshwitha Sai (Jira)" <ji...@apache.org> on 2023/11/21 12:08:00 UTC
[jira] [Comment Edited] (HDFS-17233) The conf dfs.datanode.lifeline.interval.seconds is not considering time unit seconds
[ https://issues.apache.org/jira/browse/HDFS-17233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17788389#comment-17788389 ]
Palakur Eshwitha Sai edited comment on HDFS-17233 at 11/21/23 12:07 PM:
------------------------------------------------------------------------
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).
was (Author: JIRAUSER302593):
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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org