[ 
https://issues.apache.org/jira/browse/HDFS-11296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Manoj Govindassamy updated HDFS-11296:
--------------------------------------
    Description: 
Currently it is possible to configure an expiry time in milliseconds for a 
DataNode in maintenance state. As per the design, the expiry attribute is an 
absolute time, beyond which NameNode starts to stop the ongoing maintenance 
operation for that DataNode. Internally in the code, this expiry time is read 
and checked against {{Time.monotonicNow()}} making the expiry based on more of 
JVM's runtime, which is very difficult to configure for any external user. The 
goal is to make the expiry time an absolute epoch time, so that its easy to 
configure for external users.

{noformat}
{
    "hostName": <host>,
    "port": <port>,
    "adminState": "IN_MAINTENANCE",
    "maintenanceExpireTimeInMS": <time in millis>
}
{noformat}

DatanodeInfo.java
{noformat}
  public static boolean maintenanceNotExpired(long maintenanceExpireTimeInMS) {
    return Time.monotonicNow() < maintenanceExpireTimeInMS;
  }
{noformat}

  was:

Currently it is possible to configure an expiry time in milliseconds for a 
DataNode in maintenance state. As per the design, the expiry attribute is an 
absolute time, beyond which NameNode starts to stop the ongoing maintenance 
operation for that DataNode. Internally in the code, this expiry time is read 
and checked against {{Time.monotonicNow()}} making the expiry based on more of 
JVM's runtime, which is very difficult to configure for any external user. The 
goal is to make the expiry time an absolute epoch time, so that its easy to 
configure for external users.

{noformat}
{
    "hostName": <host>,
    "port": <port>,
    "adminState": "IN_MAINTENANCE",
    "maintenanceExpireTimeInMS": <time in millis>
}
{noformat}

DatanodeInfo.java
{noformat}
  public static boolean maintenanceNotExpired(long maintenanceExpireTimeInMS) {
    return Time.monotonicNow() < maintenanceExpireTimeInMS;
  }
{noformat}

    Component/s:     (was: datanode)
                     (was: namenode)

> Maintenance state expiry should be an epoch time and not jvm monotonic
> ----------------------------------------------------------------------
>
>                 Key: HDFS-11296
>                 URL: https://issues.apache.org/jira/browse/HDFS-11296
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>    Affects Versions: 3.0.0-alpha1
>            Reporter: Manoj Govindassamy
>            Assignee: Manoj Govindassamy
>         Attachments: HDFS-11296.01.patch
>
>
> Currently it is possible to configure an expiry time in milliseconds for a 
> DataNode in maintenance state. As per the design, the expiry attribute is an 
> absolute time, beyond which NameNode starts to stop the ongoing maintenance 
> operation for that DataNode. Internally in the code, this expiry time is read 
> and checked against {{Time.monotonicNow()}} making the expiry based on more 
> of JVM's runtime, which is very difficult to configure for any external user. 
> The goal is to make the expiry time an absolute epoch time, so that its easy 
> to configure for external users.
> {noformat}
> {
>     "hostName": <host>,
>     "port": <port>,
>     "adminState": "IN_MAINTENANCE",
>     "maintenanceExpireTimeInMS": <time in millis>
> }
> {noformat}
> DatanodeInfo.java
> {noformat}
>   public static boolean maintenanceNotExpired(long maintenanceExpireTimeInMS) 
> {
>     return Time.monotonicNow() < maintenanceExpireTimeInMS;
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to