From 13fdb584906e0992e30f08c8a1df7a3c10f742bf Mon Sep 17 00:00:00 2001 From: Xiaoyu Yao Date: Wed, 27 Sep 2017 15:44:04 -0700 Subject: [PATCH] HDFS-12554. Ozone: Fix TestDatanodeStateMachine#testDatanodeStateMachineWithInvalidConfiguration. Contributed by Ajay Kumar. --- .../java/org/apache/hadoop/ozone/web/utils/OzoneUtils.java | 2 +- .../hadoop-hdfs/src/site/markdown/OzoneGettingStarted.md.vm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/utils/OzoneUtils.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/utils/OzoneUtils.java index f3854f81767..46949f001e9 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/utils/OzoneUtils.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/utils/OzoneUtils.java @@ -270,7 +270,7 @@ public final class OzoneUtils { */ public static String getDatanodeIDPath(Configuration conf) { String dataNodeIDPath = conf.get(ScmConfigKeys.OZONE_SCM_DATANODE_ID); - if (Strings.isNullOrEmpty(dataNodeIDPath)) { + if (dataNodeIDPath == null) { String metaPath = conf.get(OzoneConfigKeys.OZONE_METADATA_DIRS); if (Strings.isNullOrEmpty(metaPath)) { // this means meta data is not found, in theory should not happen at diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/OzoneGettingStarted.md.vm b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/OzoneGettingStarted.md.vm index ec9d65ccb35..18b89b226b3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/OzoneGettingStarted.md.vm +++ b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/OzoneGettingStarted.md.vm @@ -139,9 +139,9 @@ place and not mingled with HDFS settings. ``` * _*ozone.scm.datanode.id*_ Each datanode that speaks to SCM generates an ID -just like HDFS. This ID is stored is a location pointed by this setting. If -this setting is not valid, datanodes will fail to come up. Please note: -This path that is will created by datanodes to store the datanode ID. Here is an example, +just like HDFS. This is an optional setting. Please note: +This path will be created by datanodes if it doesn't exist already. Here is an + example, ```