You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by li...@apache.org on 2020/09/12 08:50:14 UTC
[hadoop] branch trunk updated: HDFS-15573. Only log warning if
considerLoad and considerStorageType are both true. Contributed by Stephen
O'Donnell
This is an automated email from the ASF dual-hosted git repository.
liuml07 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 f59f7f2 HDFS-15573. Only log warning if considerLoad and considerStorageType are both true. Contributed by Stephen O'Donnell
f59f7f2 is described below
commit f59f7f21758fb7a39aaaa1f2f5198a4c3eaba445
Author: Mingliang Liu <li...@apache.org>
AuthorDate: Sat Sep 12 01:41:38 2020 -0700
HDFS-15573. Only log warning if considerLoad and considerStorageType are both true. Contributed by Stephen O'Donnell
---
.../hdfs/server/blockmanagement/DatanodeManager.java | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeManager.java
index fbe132a..1b474fd 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeManager.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeManager.java
@@ -326,12 +326,14 @@ public class DatanodeManager {
this.readConsiderStorageType = conf.getBoolean(
DFSConfigKeys.DFS_NAMENODE_READ_CONSIDERSTORAGETYPE_KEY,
DFSConfigKeys.DFS_NAMENODE_READ_CONSIDERSTORAGETYPE_DEFAULT);
- LOG.warn(
- "{} and {} are incompatible and only one can be enabled. "
- + "Both are currently enabled.",
- DFSConfigKeys.DFS_NAMENODE_READ_CONSIDERLOAD_KEY,
- DFSConfigKeys.DFS_NAMENODE_READ_CONSIDERSTORAGETYPE_KEY);
-
+ if (readConsiderLoad && readConsiderStorageType) {
+ LOG.warn(
+ "{} and {} are incompatible and only one can be enabled. "
+ + "Both are currently enabled. {} will be ignored.",
+ DFSConfigKeys.DFS_NAMENODE_READ_CONSIDERLOAD_KEY,
+ DFSConfigKeys.DFS_NAMENODE_READ_CONSIDERSTORAGETYPE_KEY,
+ DFSConfigKeys.DFS_NAMENODE_READ_CONSIDERSTORAGETYPE_KEY);
+ }
this.avoidStaleDataNodesForWrite = conf.getBoolean(
DFSConfigKeys.DFS_NAMENODE_AVOID_STALE_DATANODE_FOR_WRITE_KEY,
DFSConfigKeys.DFS_NAMENODE_AVOID_STALE_DATANODE_FOR_WRITE_DEFAULT);
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org