Author: cdouglas
Date: Mon May 11 18:46:19 2009
New Revision: 773654
URL: http://svn.apache.org/viewvc?rev=773654&view=rev
Log:
Revert HADOOP-5675
Modified:
hadoop/core/trunk/CHANGES.txt
hadoop/core/trunk/src/tools/org/apache/hadoop/tools/DistCp.java
Modified: hadoop/core/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=773654&r1=773653&r2=773654&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Mon May 11 18:46:19 2009
@@ -309,9 +309,6 @@
HADOOP-5596. Add EnumSetWritable. (He Yongqiang via szetszwo)
- HADOOP-5675. Do not launch a job if DistCp has no work to do. (Tsz Wo
- (Nicholas), SZE via cdouglas)
-
HADOOP-5727. Simplify hashcode for ID types. (Shevek via cdouglas)
HADOOP-5500. In DBOutputFormat, where field names are absent permit the
Modified: hadoop/core/trunk/src/tools/org/apache/hadoop/tools/DistCp.java
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/tools/org/apache/hadoop/tools/DistCp.java?rev=773654&r1=773653&r2=773654&view=diff
==============================================================================
--- hadoop/core/trunk/src/tools/org/apache/hadoop/tools/DistCp.java (original)
+++ hadoop/core/trunk/src/tools/org/apache/hadoop/tools/DistCp.java Mon May 11
18:46:19 2009
@@ -647,9 +647,8 @@
//Initialize the mapper
try {
- if (setup(conf, job, args)) {
- JobClient.runJob(job);
- }
+ setup(conf, job, args);
+ JobClient.runJob(job);
finalize(conf, job, args.dst, args.preservedAttributes);
} finally {
//delete tmp
@@ -969,9 +968,8 @@
* @param conf : The dfs/mapred configuration.
* @param jobConf : The handle to the jobConf object to be initialized.
* @param args Arguments
- * @return true if it is necessary to launch a job.
*/
- private static boolean setup(Configuration conf, JobConf jobConf,
+ private static void setup(Configuration conf, JobConf jobConf,
final Arguments args)
throws IOException {
jobConf.set(DST_DIR_LABEL, args.dst.toUri().toString());
@@ -1141,12 +1139,10 @@
(dstExists && !dstIsDir) || (!dstExists && srcCount == 1)?
args.dst.getParent(): args.dst, "_distcp_tmp_" + randomId);
jobConf.set(TMP_DIR_LABEL, tmpDir.toUri().toString());
- LOG.info("srcCount = " + srcCount);
- LOG.info("byteCount= " + StringUtils.humanReadableInt(byteCount));
+ LOG.info("srcCount=" + srcCount);
jobConf.setInt(SRC_COUNT_LABEL, srcCount);
jobConf.setLong(TOTAL_SIZE_LABEL, byteCount);
setMapCount(byteCount, jobConf);
- return byteCount > 0;
}
/**