hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r796826 - in /hadoop/mapreduce/trunk: CHANGES.txt src/java/org/apache/hadoop/mapred/JobHistory.java src/tools/org/apache/hadoop/tools/DistCp.java
Date Wed, 22 Jul 2009 18:46:39 GMT
Author: szetszwo
Date: Wed Jul 22 18:46:39 2009
New Revision: 796826

URL: http://svn.apache.org/viewvc?rev=796826&view=rev
Log:
MAPREDUCE-765. Eliminate the deprecated warnings introduced by H-5438.  Contributed by He
Yongqiang

Modified:
    hadoop/mapreduce/trunk/CHANGES.txt
    hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/JobHistory.java
    hadoop/mapreduce/trunk/src/tools/org/apache/hadoop/tools/DistCp.java

Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=796826&r1=796825&r2=796826&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Wed Jul 22 18:46:39 2009
@@ -256,3 +256,6 @@
 
     MAPREDUCE-743. Fixes a problem to do with progress reporting
     in the map phase. (Ravi Gummadi via ddas)
+
+    MAPREDUCE-765. Eliminate the deprecated warnings introduced by H-5438.
+    (He Yongqiang via szetszwo)

Modified: hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/JobHistory.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/JobHistory.java?rev=796826&r1=796825&r2=796826&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/JobHistory.java (original)
+++ hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/JobHistory.java Wed Jul 22 18:46:39
2009
@@ -28,6 +28,7 @@
 import java.net.URLDecoder;
 import java.net.URLEncoder;
 import java.util.ArrayList;
+import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.TreeMap;
@@ -37,6 +38,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.fs.CreateFlag;
 import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileStatus;
@@ -1057,7 +1059,7 @@
               JT_FS.getConf().getInt("io.file.buffer.size", 4096);
             out = JT_FS.create(logFile, 
                             new FsPermission(HISTORY_FILE_PERMISSION),
-                            true, 
+                            EnumSet.of(CreateFlag.OVERWRITE), 
                             defaultBufferSize, 
                             JT_FS.getDefaultReplication(), 
                             jobHistoryBlockSize, null);
@@ -1142,7 +1144,7 @@
           if (!JT_FS.exists(jobFilePath)) {
             jobFileOut = JT_FS.create(jobFilePath, 
                                    new FsPermission(HISTORY_FILE_PERMISSION),
-                                   true, 
+                                   EnumSet.of(CreateFlag.OVERWRITE), 
                                    defaultBufferSize, 
                                    JT_FS.getDefaultReplication(), 
                                    JT_FS.getDefaultBlockSize(), null);

Modified: hadoop/mapreduce/trunk/src/tools/org/apache/hadoop/tools/DistCp.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/tools/org/apache/hadoop/tools/DistCp.java?rev=796826&r1=796825&r2=796826&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/tools/org/apache/hadoop/tools/DistCp.java (original)
+++ hadoop/mapreduce/trunk/src/tools/org/apache/hadoop/tools/DistCp.java Wed Jul 22 18:46:39
2009
@@ -37,6 +37,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.CreateFlag;
 import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileChecksum;
@@ -362,7 +363,7 @@
           srcstat.getReplication(): destFileSys.getDefaultReplication();
       long blockSize = preseved.contains(FileAttribute.BLOCK_SIZE)?
           srcstat.getBlockSize(): destFileSys.getDefaultBlockSize();
-      return destFileSys.create(f, permission, true, sizeBuf, replication,
+      return destFileSys.create(f, permission, EnumSet.of(CreateFlag.OVERWRITE), sizeBuf,
replication,
           blockSize, reporter);
     }
 



Mime
View raw message