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 cu...@apache.org on 2006/05/31 00:56:15 UTC
svn commit: r410399 -
/lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java
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);
}