Class DatanodeIdYaml
java.lang.Object
org.apache.hadoop.ozone.container.common.helpers.DatanodeIdYaml
Class for creating datanode.id file in yaml format.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDatanode details bean to be written to the yaml file. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreateDatanodeIdFile(org.apache.hadoop.hdds.protocol.DatanodeDetails datanodeDetails, File path, org.apache.hadoop.hdds.conf.ConfigurationSource conf) Creates a yaml file using DatanodeDetails.static org.apache.hadoop.hdds.protocol.DatanodeDetailsreadDatanodeIdFile(File path) Read datanode.id from file.
-
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-DatanodeDetailspath- 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
-