Skip to content

Commit 8a4facb

Browse files
committed
HDDS-1473. Minor fixes.
1 parent f30e4a8 commit 8a4facb

File tree

1 file changed

+1
-3
lines changed
  • hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers

1 file changed

+1
-3
lines changed

hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/DatanodeIdYaml.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ private DatanodeIdYaml() {
5252
*/
5353
public static void createDatanodeIdFile(DatanodeDetails datanodeDetails,
5454
File path) throws IOException {
55-
Preconditions.checkNotNull(path);
5655
DumperOptions options = new DumperOptions();
5756
options.setPrettyFlow(true);
5857
options.setDefaultFlowStyle(DumperOptions.FlowStyle.FLOW);
@@ -69,7 +68,6 @@ public static void createDatanodeIdFile(DatanodeDetails datanodeDetails,
6968
*/
7069
public static DatanodeDetails readDatanodeIdFile(File path)
7170
throws IOException {
72-
Preconditions.checkNotNull(path);
7371
DatanodeDetails datanodeDetails;
7472
try (FileInputStream inputFileStream = new FileInputStream(path)) {
7573
Yaml yaml = new Yaml();
@@ -82,7 +80,7 @@ public static DatanodeDetails readDatanodeIdFile(File path)
8280
}
8381

8482
DatanodeDetails.Builder builder = DatanodeDetails.newBuilder();
85-
builder.setUuid(datanodeDetailsYaml.getUuid().toString())
83+
builder.setUuid(datanodeDetailsYaml.getUuid())
8684
.setIpAddress(datanodeDetailsYaml.getIpAddress())
8785
.setHostName(datanodeDetailsYaml.getHostName())
8886
.setCertSerialId(datanodeDetailsYaml.getCertSerialId());

0 commit comments

Comments
 (0)