Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-7877 [Umbrella] Support maintenance state for datanodes
  3. HDFS-11296

Maintenance state expiry should be an epoch time and not jvm monotonic

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha1
    • 2.9.0, 3.0.0-alpha4
    • None
    • None

    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.

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

      DatanodeInfo.java

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

      Attachments

        1. HDFS-11296.03.patch
          4 kB
          Manoj Govindassamy
        2. HDFS-11296-branch-2.03.patch
          4 kB
          Manoj Govindassamy
        3. HDFS-11296.02.patch
          3 kB
          Manoj Govindassamy
        4. HDFS-11296-branch-2.02.patch
          3 kB
          Manoj Govindassamy
        5. HDFS-11296-branch-2.01.patch
          4 kB
          Manoj Govindassamy
        6. HDFS-11296.01.patch
          4 kB
          Manoj Govindassamy

        Activity

          People

            manojg Manoj Govindassamy
            manojg Manoj Govindassamy
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: