Class DatanodeIdYaml

java.lang.Object
org.apache.hadoop.ozone.container.common.helpers.DatanodeIdYaml

public final class DatanodeIdYaml extends Object
Class for creating datanode.id file in yaml format.
  • Method Details

    • createDatanodeIdFile

      public static void createDatanodeIdFile(org.apache.hadoop.hdds.protocol.DatanodeDetails datanodeDetails, File path, org.apache.hadoop.hdds.conf.ConfigurationSource conf) throws IOException
      Creates a yaml file using DatanodeDetails. This method expects the path validation to be performed by the caller.
      Parameters:
      datanodeDetails - DatanodeDetails
      path - Path to datnode.id file
      Throws:
      IOException
    • readDatanodeIdFile

      public static org.apache.hadoop.hdds.protocol.DatanodeDetails readDatanodeIdFile(File path) throws IOException
      Read datanode.id from file.
      Throws:
      IOException