hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [27/29] hadoop git commit: HADOOP-12173. NetworkTopology::add calls toString always. Contributed by Inigo Goiri
Date Fri, 03 Jul 2015 14:16:30 GMT
HADOOP-12173. NetworkTopology::add calls toString always. Contributed by Inigo Goiri


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/e59f6fad
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e59f6fad
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e59f6fad

Branch: refs/heads/HADOOP-12111
Commit: e59f6fad6a8849cfab6acbf012f338d9cc7dd63c
Parents: 5fddc51
Author: Chris Douglas <cdouglas@apache.org>
Authored: Thu Jul 2 21:39:48 2015 -0700
Committer: Chris Douglas <cdouglas@apache.org>
Committed: Thu Jul 2 21:39:48 2015 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/net/NetworkTopology.java      | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/e59f6fad/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java
index c60cc0b..63b6763 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java
@@ -396,14 +396,13 @@ public class NetworkTopology {
     int newDepth = NodeBase.locationToDepth(node.getNetworkLocation()) + 1;
     netlock.writeLock().lock();
     try {
-      String oldTopoStr = this.toString();
       if( node instanceof InnerNode ) {
         throw new IllegalArgumentException(
           "Not allow to add an inner node: "+NodeBase.getPath(node));
       }
       if ((depthOfAllLeaves != -1) && (depthOfAllLeaves != newDepth)) {
         LOG.error("Error: can't add leaf node " + NodeBase.getPath(node) +
-            " at depth " + newDepth + " to topology:\n" + oldTopoStr);
+            " at depth " + newDepth + " to topology:\n" + this.toString());
         throw new InvalidTopologyException("Failed to add " + NodeBase.getPath(node) +
             ": You cannot have a rack and a non-rack node at the same " +
             "level of the network topology.");


Mime
View raw message