hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hair...@apache.org
Subject svn commit: r723462 - in /hadoop/core/branches/branch-0.18: ./ CHANGES.txt src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java src/mapred/org/apache/hadoop/mapred/FileOutputFormat.java
Date Thu, 04 Dec 2008 21:59:00 GMT
Author: hairong
Date: Thu Dec  4 13:59:00 2008
New Revision: 723462

URL: http://svn.apache.org/viewvc?rev=723462&view=rev
Log:
Merge -r 723459:723460 from main to move the change log of HADOOP-4746 to branch 0.18.

Modified:
    hadoop/core/branches/branch-0.18/   (props changed)
    hadoop/core/branches/branch-0.18/CHANGES.txt   (contents, props changed)
    hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java
    hadoop/core/branches/branch-0.18/src/mapred/org/apache/hadoop/mapred/FileOutputFormat.java

Propchange: hadoop/core/branches/branch-0.18/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  4 13:59:00 2008
@@ -1,2 +1,2 @@
 /hadoop/core/branches/branch-0.19:704733
-/hadoop/core/trunk:699517,700163,704701,704732,705420,705430,707258,709040,720602
+/hadoop/core/trunk:699517,700163,704701,704732,705420,705430,707258,709040,720602,723460

Modified: hadoop/core/branches/branch-0.18/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/CHANGES.txt?rev=723462&r1=723461&r2=723462&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.18/CHANGES.txt Thu Dec  4 13:59:00 2008
@@ -69,6 +69,8 @@
     HADOOP-4734. Block and meta data validation codes in HADOOP-1700 should be
     committed to 0.18. (szetszwo)
 
+    HADOOP-4746. Job output directory should be normalized. (hairong)
+
 Release 0.18.2 - 2008-11-03
 
   BUG FIXES

Propchange: hadoop/core/branches/branch-0.18/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  4 13:59:00 2008
@@ -1 +1 @@
-/hadoop/core/trunk/CHANGES.txt:699517,700163,700923,704701,705420,705430,707258,709040,720602
+/hadoop/core/trunk/CHANGES.txt:699517,700163,700923,704701,705420,705430,707258,709040,720602,723460

Modified: hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java?rev=723462&r1=723461&r2=723462&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java Thu
Dec  4 13:59:00 2008
@@ -3189,8 +3189,8 @@
     //
     // Modify the blocks->datanode map and node's map.
     // 
-    addStoredBlock(block, node, delHintNode );
     pendingReplications.remove(block);
+    addStoredBlock(block, node, delHintNode );
   }
 
   long[] getStats() throws IOException {

Modified: hadoop/core/branches/branch-0.18/src/mapred/org/apache/hadoop/mapred/FileOutputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/mapred/org/apache/hadoop/mapred/FileOutputFormat.java?rev=723462&r1=723461&r2=723462&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/src/mapred/org/apache/hadoop/mapred/FileOutputFormat.java
(original)
+++ hadoop/core/branches/branch-0.18/src/mapred/org/apache/hadoop/mapred/FileOutputFormat.java
Thu Dec  4 13:59:00 2008
@@ -100,9 +100,16 @@
     if (outDir == null && job.getNumReduceTasks() != 0) {
       throw new InvalidJobConfException("Output directory not set in JobConf.");
     }
-    if (outDir != null && outDir.getFileSystem(job).exists(outDir)) {
-      throw new FileAlreadyExistsException("Output directory " + outDir + 
-                                           " already exists");
+    if (outDir != null) {
+      FileSystem fs = outDir.getFileSystem(job);
+      // normalize the output directory
+      outDir = fs.makeQualified(outDir);
+      setOutputPath(job, outDir);
+      // check its existence
+      if (fs.exists(outDir)) {
+        throw new FileAlreadyExistsException("Output directory " + outDir + 
+                                             " already exists");
+      }
     }
   }
 



Mime
View raw message