This is an automated email from the ASF dual-hosted git repository.
ajay pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 64f30da HDDS-1450. Fix nightly run failures after HDDS-976.
Contributed by Xiaoyu Yao. (#757)
64f30da is described below
commit 64f30da42813182e9cf69ec306c1f1c0c633ece0
Author: Xiaoyu Yao <[email protected]>
AuthorDate: Tue Apr 23 21:38:23 2019 -0700
HDDS-1450. Fix nightly run failures after HDDS-976. Contributed by Xiaoyu
Yao. (#757)
---
.../src/main/java/org/apache/hadoop/hdds/scm/ScmConfigKeys.java | 2 --
.../java/org/apache/hadoop/hdds/scm/net/NodeSchemaManager.java | 7 +++----
hadoop-hdds/common/src/main/resources/ozone-default.xml | 6 ++++--
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ScmConfigKeys.java
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ScmConfigKeys.java
index 2c267fb..b097321 100644
---
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ScmConfigKeys.java
+++
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ScmConfigKeys.java
@@ -368,8 +368,6 @@ public final class ScmConfigKeys {
"hdds.scm.http.kerberos.keytab";
// Network topology
- public static final String OZONE_SCM_NETWORK_TOPOLOGY_SCHEMA_FILE_TYPE =
- "ozone.scm.network.topology.schema.file.type";
public static final String OZONE_SCM_NETWORK_TOPOLOGY_SCHEMA_FILE =
"ozone.scm.network.topology.schema.file";
public static final String OZONE_SCM_NETWORK_TOPOLOGY_SCHEMA_FILE_DEFAULT =
diff --git
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NodeSchemaManager.java
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NodeSchemaManager.java
index 8e5d935..9a598c6 100644
---
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NodeSchemaManager.java
+++
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NodeSchemaManager.java
@@ -19,6 +19,7 @@ package org.apache.hadoop.hdds.scm.net;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
+import org.apache.commons.io.FilenameUtils;
import org.apache.hadoop.hdds.scm.ScmConfigKeys;
import org.apache.hadoop.hdds.scm.net.NodeSchemaLoader.NodeSchemaLoadResult;
import org.slf4j.Logger;
@@ -59,16 +60,14 @@ public final class NodeSchemaManager {
/**
* Load schemas from network topology schema configuration file
*/
- String schemaFileType = conf.get(
- ScmConfigKeys.OZONE_SCM_NETWORK_TOPOLOGY_SCHEMA_FILE_TYPE);
-
String schemaFile = conf.get(
ScmConfigKeys.OZONE_SCM_NETWORK_TOPOLOGY_SCHEMA_FILE,
ScmConfigKeys.OZONE_SCM_NETWORK_TOPOLOGY_SCHEMA_FILE_DEFAULT);
NodeSchemaLoadResult result;
try {
- if (schemaFileType.toLowerCase().compareTo("yaml") == 0) {
+ if (FilenameUtils.getExtension(schemaFile).toLowerCase()
+ .compareTo("yaml") == 0) {
result = NodeSchemaLoader.getInstance().loadSchemaFromYaml(schemaFile);
} else {
result = NodeSchemaLoader.getInstance().loadSchemaFromXml(schemaFile);
diff --git a/hadoop-hdds/common/src/main/resources/ozone-default.xml
b/hadoop-hdds/common/src/main/resources/ozone-default.xml
index f40040c..162c93f 100644
--- a/hadoop-hdds/common/src/main/resources/ozone-default.xml
+++ b/hadoop-hdds/common/src/main/resources/ozone-default.xml
@@ -2288,10 +2288,12 @@
</property>
<property>
<name>ozone.scm.network.topology.schema.file</name>
- <value>network-topology-default.xm</value>
+ <value>network-topology-default.xml</value>
<tag>OZONE, MANAGEMENT</tag>
<description>
- The schema file defines the ozone network topology
+ The schema file defines the ozone network topology. We currently support
+ xml(default) and yaml format. Refer to the samples in the topology
+ awareness document for xml and yaml topology definition samples.
</description>
</property>
<property>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]