hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject svn commit: r522192 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/FSNamesystem.java
Date Sun, 25 Mar 2007 11:16:47 GMT
Author: tomwhite
Date: Sun Mar 25 04:16:46 2007
New Revision: 522192

URL: http://svn.apache.org/viewvc?view=rev&rev=522192
Log:
HADOOP-1068.  Improve error message for clusters with 0 datanodes.  Contributed by Dhruba
Borthakur.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=522192&r1=522191&r2=522192
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Sun Mar 25 04:16:46 2007
@@ -31,6 +31,9 @@
     records to not allocate a new BinaryOutputArchive or
     BinaryInputArchive per call.  (Milind Bhandarkar via cutting)
 
+10. HADOOP-1068.  Improve error message for clusters with 0 datanodes.
+    (Dhruba Borthakur via tomwhite)
+
 
 Release 0.12.2 - 2007-23-17
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java?view=diff&rev=522192&r1=522191&r2=522192
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java Sun Mar 25 04:16:46
2007
@@ -724,10 +724,19 @@
         DatanodeDescriptor targets[] = replicator.chooseTarget(replication,
             getDatanodeByHost(clientMachine.toString()), null, blockSize);
         if (targets.length < this.minReplication) {
-            throw new IOException("failed to create file "+src
-                    +" on client " + clientMachine
-                    +" because target-length is " + targets.length 
-                    +", below MIN_REPLICATION (" + minReplication+ ")");
+            if (clusterMap.getNumOfLeaves() == 0) {
+              throw new IOException("Failed to create file "+src
+                    + " on client " + clientMachine
+                    + " because this cluster has no datanodes.");
+            }
+            throw new IOException("Failed to create file "+src
+                    + " on client " + clientMachine
+                    + " because there were not enough datanodes available. "
+                    + "Found " + targets.length
+                    + " datanodes but MIN_REPLICATION for the cluster is "
+                    + "configured to be "
+                    + this.minReplication
+                    + ".");
        }
 
         // Reserve space for this pending file



Mime
View raw message