hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r410399 - /lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java
Date Tue, 30 May 2006 22:56:15 GMT
Author: cutting
Date: Tue May 30 15:56:15 2006
New Revision: 410399

URL: http://svn.apache.org/viewvc?rev=410399&view=rev
Log:
HADOOP-242.  Improved error message when unable to create a local file.  Contributed by Owen.

Modified:
    lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java?rev=410399&r1=410398&r2=410399&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java Tue May 30 15:56:15
2006
@@ -286,9 +286,15 @@
       int index = (hashCode+i & Integer.MAX_VALUE) % dirs.length;
       Path file = new Path(dirs[index], path);
       Path dir = file.getParent();
-      if (fs.exists(dir) || fs.mkdirs(dir)) {
+      if (fs.mkdirs(dir) || fs.exists(dir)) {
         return file;
       }
+    }
+    LOG.warning("Could not make " + path + 
+                " in local directories from " + dirsProp);
+    for(int i=0; i < dirs.length; i++) {
+      int index = (hashCode+i & Integer.MAX_VALUE) % dirs.length;
+      LOG.warning(dirsProp + "[" + index + "]=" + dirs[index]);
     }
     throw new IOException("No valid local directories in property: "+dirsProp);
   }



Mime
View raw message