hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rang...@apache.org
Subject svn commit: r750114 - in /hadoop/core/trunk: CHANGES.txt src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
Date Wed, 04 Mar 2009 19:23:49 GMT
Author: rangadi
Date: Wed Mar  4 19:23:48 2009
New Revision: 750114

URL: http://svn.apache.org/viewvc?rev=750114&view=rev
Log:
HADOOP-5383. Avoid building an unused string in NameNode's
verifyReplication(). (Raghu Angadi)

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=750114&r1=750113&r2=750114&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Wed Mar  4 19:23:48 2009
@@ -266,6 +266,9 @@
     HADOOP-5066. Building binary tarball should not build docs/javadocs, copy
     src, or run jdiff. (Giridharan Kesavan via cdouglas)
 
+    HADOOP-5383. Avoid building an unused string in NameNode's 
+    verifyReplication(). (Raghu Angadi)
+
 Release 0.20.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java?rev=750114&r1=750113&r2=750114&view=diff
==============================================================================
--- hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java (original)
+++ hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java Wed
Mar  4 19:23:48 2009
@@ -936,6 +936,12 @@
                                  short replication, 
                                  String clientName 
                                  ) throws IOException {
+    
+    if (replication >= minReplication && replication <= maxReplication) {
+      //common case. avoid building 'text'
+      return;
+    }
+    
     String text = "file " + src 
       + ((clientName != null) ? " on client " + clientName : "")
       + ".\n"



Mime
View raw message