hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r488417 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/DataNode.java
Date Mon, 18 Dec 2006 21:05:23 GMT
Author: cutting
Date: Mon Dec 18 13:05:22 2006
New Revision: 488417

URL: http://svn.apache.org/viewvc?view=rev&rev=488417
Log:
HADOOP-823.  Fix problem starting datanode when not all configured data directories exist.
 Contributed by Bryan Pendleton.

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

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=488417&r1=488416&r2=488417
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Mon Dec 18 13:05:22 2006
@@ -119,6 +119,9 @@
     namenode-internal use, and one for namespace persistence.
     (Dhruba Borthakur via cutting) 
 
+34. HADOOP-823.  Fix problem starting datanode when not all configured
+    data directories exist.  (Bryan Pendleton via cutting)
+
 
 Release 0.9.2 - 2006-12-15
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java?view=diff&rev=488417&r1=488416&r2=488417
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java Mon Dec 18 13:05:22 2006
@@ -1101,7 +1101,7 @@
    */
   static DataNode makeInstance(String[] dataDirs, Configuration conf)
   throws IOException {
-    ArrayList dirs = new ArrayList();
+    ArrayList<String> dirs = new ArrayList<String>();
     for (int i = 0; i < dataDirs.length; i++) {
       File data = new File(dataDirs[i]);
       try {
@@ -1111,7 +1111,7 @@
         LOG.warn("Invalid directory in dfs.data.dir: " + e.getMessage() );
       }
     }
-    return ((dirs.size() > 0) ? new DataNode(conf, dataDirs) : null);
+    return ((dirs.size() > 0) ? new DataNode(conf, dirs.toArray(new String[dirs.size()]))
: null);
   }
 
   public String toString() {



Mime
View raw message