hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r635650 [2/2] - in /hadoop/core/trunk: ./ src/examples/org/apache/hadoop/examples/ src/examples/org/apache/hadoop/examples/dancing/ src/java/org/apache/hadoop/dfs/ src/java/org/apache/hadoop/filecache/ src/java/org/apache/hadoop/fs/ src/jav...
Date Mon, 10 Mar 2008 18:54:21 GMT
Modified: hadoop/core/trunk/src/test/org/apache/hadoop/fs/s3/S3FileSystemBaseTest.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/fs/s3/S3FileSystemBaseTest.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/fs/s3/S3FileSystemBaseTest.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/fs/s3/S3FileSystemBaseTest.java Mon Mar 10
11:53:58 2008
@@ -179,7 +179,7 @@
       assertEquals("Position " + i, data[i], buf[i]);
     }
     
-    assertTrue("Deleted", s3FileSystem.delete(path));
+    assertTrue("Deleted", s3FileSystem.delete(path, true));
     
     assertFalse("No longer exists", s3FileSystem.exists(path));
 
@@ -227,7 +227,7 @@
   public void testDeleteNonExistentFile() throws IOException {
     Path path = new Path("/test/hadoop/file");    
     assertFalse("Doesn't exist", s3FileSystem.exists(path));
-    assertFalse("No deletion", s3FileSystem.delete(path));
+    assertFalse("No deletion", s3FileSystem.delete(path, true));
   }
 
   public void testDeleteDirectory() throws IOException {
@@ -247,7 +247,7 @@
     assertTrue("subdir exists", s3FileSystem.exists(subdir));
     assertTrue("file2 exists", s3FileSystem.exists(file2));
     
-    assertTrue("Delete", s3FileSystem.delete(dir));
+    assertTrue("Delete", s3FileSystem.delete(dir, true));
 
     assertTrue("root exists", s3FileSystem.exists(root));
     assertFalse("dir exists", s3FileSystem.exists(dir));

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/io/TestSequenceFile.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/io/TestSequenceFile.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/io/TestSequenceFile.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/io/TestSequenceFile.java Mon Mar 10 11:53:58
2008
@@ -143,7 +143,7 @@
   private static void writeTest(FileSystem fs, int count, int seed, Path file, 
                                 CompressionType compressionType, CompressionCodec codec)
     throws IOException {
-    fs.delete(file);
+    fs.delete(file, true);
     LOG.info("creating " + count + " records with " + compressionType +
              " compression");
     SequenceFile.Writer writer = 
@@ -219,7 +219,7 @@
   private static void sortTest(FileSystem fs, int count, int megabytes, 
                                int factor, boolean fast, Path file)
     throws IOException {
-    fs.delete(new Path(file+".sorted"));
+    fs.delete(new Path(file+".sorted"), true);
     SequenceFile.Sorter sorter = newSorter(fs, fast, megabytes, factor);
     LOG.debug("sorting " + count + " records");
     sorter.sort(file, file.suffix(".sorted"));
@@ -277,8 +277,8 @@
     for (int i = 0; i < factor; i++) {
       names[i] = file.suffix("."+i);
       sortedNames[i] = names[i].suffix(".sorted");
-      fs.delete(names[i]);
-      fs.delete(sortedNames[i]);
+      fs.delete(names[i], true);
+      fs.delete(sortedNames[i], true);
       writers[i] = SequenceFile.createWriter(fs, conf, names[i], 
                                              RandomDatum.class, RandomDatum.class, compressionType);
     }
@@ -302,7 +302,7 @@
     }
 
     LOG.info("merging " + factor + " files with " + count/factor + " debug");
-    fs.delete(new Path(file+".sorted"));
+    fs.delete(new Path(file+".sorted"), true);
     newSorter(fs, fast, megabytes, factor)
       .merge(sortedNames, file.suffix(".sorted"));
   }
@@ -388,7 +388,7 @@
   private static void writeMetadataTest(FileSystem fs, int count, int seed, Path file, 
                                         CompressionType compressionType, CompressionCodec
codec, SequenceFile.Metadata metadata)
     throws IOException {
-    fs.delete(file);
+    fs.delete(file, true);
     LOG.info("creating " + count + " records with metadata and with" + compressionType +
              " compression");
     SequenceFile.Writer writer = 

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/BigMapOutput.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/BigMapOutput.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/BigMapOutput.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/BigMapOutput.java Mon Mar 10 11:53:58
2008
@@ -132,7 +132,7 @@
     jobConf.setOutputFormat(SequenceFileOutputFormat.class);
     jobConf.setInputPath(bigMapInput);
     if (fs.exists(outputPath)) {
-      fs.delete(outputPath);
+      fs.delete(outputPath, true);
     }
     jobConf.setOutputPath(outputPath);
     jobConf.setMapperClass(IdentityMapper.class);

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/MRBench.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/MRBench.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/MRBench.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/MRBench.java Mon Mar 10 11:53:58 2008
@@ -282,7 +282,7 @@
       execTimes = runJobInSequence(jobConf, numRuns);
     } finally {
       // delete output -- should we really do this?
-      fs.delete(BASE_DIR);
+      fs.delete(BASE_DIR, true);
     }
     
     if (verbose) {

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/MRCaching.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/MRCaching.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/MRCaching.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/MRCaching.java Mon Mar 10 11:53:58
2008
@@ -71,7 +71,7 @@
           throw new IOException("Mkdirs failed to create " + file.toString());
         }
         Path fileOut = new Path(file, "test.txt");
-        fs.delete(fileOut);
+        fs.delete(fileOut, true);
         DataOutputStream out = fs.create(fileOut);
         for (int i = 0; i < localArchives.length; i++) {
           // read out the files from these archives
@@ -149,7 +149,7 @@
     final Path inDir = new Path(indir);
     final Path outDir = new Path(outdir);
     FileSystem fs = FileSystem.get(conf);
-    fs.delete(outDir);
+    fs.delete(outDir, true);
     if (!fs.mkdirs(inDir)) {
       throw new IOException("Mkdirs failed to create " + inDir.toString());
     }
@@ -179,7 +179,7 @@
     Path jarPath = new Path(localPath, new Path("test.jar"));
     Path zipPath = new Path(localPath, new Path("test.zip"));
     Path cachePath = new Path(cacheDir);
-    fs.delete(cachePath);
+    fs.delete(cachePath, true);
     if (!fs.mkdirs(cachePath)) {
       throw new IOException("Mkdirs failed to create " + cachePath.toString());
     }

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/NotificationTestCase.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/NotificationTestCase.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/NotificationTestCase.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/NotificationTestCase.java Mon Mar
10 11:53:58 2008
@@ -185,7 +185,7 @@
     }
 
     FileSystem fs = FileSystem.get(conf);
-    fs.delete(outDir);
+    fs.delete(outDir, true);
     if (!fs.mkdirs(inDir)) {
       throw new IOException("Mkdirs failed to create " + inDir.toString());
     }

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/PiEstimator.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/PiEstimator.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/PiEstimator.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/PiEstimator.java Mon Mar 10 11:53:58
2008
@@ -153,7 +153,7 @@
     Path inDir = new Path(tmpDir, "in");
     Path outDir = new Path(tmpDir, "out");
     FileSystem fileSys = FileSystem.get(jobConf);
-    fileSys.delete(tmpDir);
+    fileSys.delete(tmpDir, true);
     if (!fileSys.mkdirs(inDir)) {
       throw new IOException("Mkdirs failed to create " + inDir.toString());
     }
@@ -183,7 +183,7 @@
       reader.close();
       estimate = (double) (numInside.get()*4.0)/(numMaps*numPoints);
     } finally {
-      FileSystem.get(jobConf).delete(tmpDir);
+      FileSystem.get(jobConf).delete(tmpDir, true);
     }
     
     return estimate;

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/SortValidator.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/SortValidator.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/SortValidator.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/SortValidator.java Mon Mar 10 11:53:58
2008
@@ -340,7 +340,7 @@
       jobConf.addInputPath(sortOutput);
       Path outputPath = new Path("/tmp/sortvalidate/recordstatschecker");
       if (fs.exists(outputPath)) {
-        fs.delete(outputPath);
+        fs.delete(outputPath, true);
       }
       jobConf.setOutputPath(outputPath);
       
@@ -482,7 +482,7 @@
       Path outputPath = new Path("/tmp/sortvalidate/recordchecker");
       FileSystem fs = FileSystem.get(defaults);
       if (fs.exists(outputPath)) {
-        fs.delete(outputPath);
+        fs.delete(outputPath, true);
       }
       jobConf.setOutputPath(outputPath);
       

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestCollect.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestCollect.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestCollect.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestCollect.java Mon Mar 10 11:53:58
2008
@@ -139,7 +139,7 @@
       throw ioe;
     } finally {
       FileSystem fs = FileSystem.get(conf);
-      fs.delete(OUTPUT_DIR);
+      fs.delete(OUTPUT_DIR, true);
     }
   }
   

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestComparators.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestComparators.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestComparators.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestComparators.java Mon Mar 10 11:53:58
2008
@@ -295,7 +295,7 @@
     Path inDir = new Path(testdir, "in");
     Path outDir = new Path(testdir, "out");
     FileSystem fs = FileSystem.get(conf);
-    fs.delete(testdir);
+    fs.delete(testdir, true);
     conf.setInputFormat(SequenceFileInputFormat.class);
     conf.setInputPath(inDir);
     conf.setOutputPath(outDir);

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestEmptyJobWithDFS.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestEmptyJobWithDFS.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestEmptyJobWithDFS.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestEmptyJobWithDFS.java Mon Mar 10
11:53:58 2008
@@ -60,7 +60,7 @@
     final Path inDir = new Path("/testing/empty/input");
     final Path outDir = new Path("/testing/empty/output");
     FileSystem fs = FileSystem.getNamed(fileSys, conf);
-    fs.delete(outDir);
+    fs.delete(outDir, true);
     if (!fs.mkdirs(inDir)) {
       LOG.warn("Can't create " + inDir);
       return false;

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestFieldSelection.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestFieldSelection.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestFieldSelection.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestFieldSelection.java Mon Mar 10
11:53:58 2008
@@ -45,9 +45,9 @@
     Path OUTPUT_DIR = new Path("build/test/output_for_field_selection_test");
     Path INPUT_DIR = new Path("build/test/input_for_field_selection_test");
     String inputFile = "input.txt";
-    fs.delete(INPUT_DIR);
+    fs.delete(INPUT_DIR, true);
     fs.mkdirs(INPUT_DIR);
-    fs.delete(OUTPUT_DIR);
+    fs.delete(OUTPUT_DIR, true);
 
     StringBuffer inputData = new StringBuffer();
     StringBuffer expectedOutput = new StringBuffer();
@@ -118,8 +118,8 @@
     String outdata = TestMiniMRWithDFS.readOutput(outPath,job);
 
     assertEquals(expectedOutput.toString(),outdata);
-    fs.delete(OUTPUT_DIR);
-    fs.delete(INPUT_DIR);
+    fs.delete(OUTPUT_DIR, true);
+    fs.delete(INPUT_DIR, true);
   }
 
   /**

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestKeyValueTextInputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestKeyValueTextInputFormat.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestKeyValueTextInputFormat.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestKeyValueTextInputFormat.java Mon
Mar 10 11:53:58 2008
@@ -58,7 +58,7 @@
     LOG.info("seed = "+seed);
     Random random = new Random(seed);
 
-    localFs.delete(workDir);
+    localFs.delete(workDir, true);
     job.setInputPath(workDir);
 
     // for a variety of lengths
@@ -209,7 +209,7 @@
     JobConf job = new JobConf();
     CompressionCodec gzip = new GzipCodec();
     ReflectionUtils.setConf(gzip, job);
-    localFs.delete(workDir);
+    localFs.delete(workDir, true);
     writeFile(localFs, new Path(workDir, "part1.txt.gz"), gzip, 
               "line-1\tthe quick\nline-2\tbrown\nline-3\tfox jumped\nline-4\tover\nline-5\t
the lazy\nline-6\t dog\n");
     writeFile(localFs, new Path(workDir, "part2.txt.gz"), gzip,

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMapOutputType.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMapOutputType.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMapOutputType.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMapOutputType.java Mon Mar 10
11:53:58 2008
@@ -80,7 +80,7 @@
     Path inDir = new Path(testdir, "in");
     Path outDir = new Path(testdir, "out");
     FileSystem fs = FileSystem.get(conf);
-    fs.delete(testdir);
+    fs.delete(testdir, true);
     conf.setInt("io.sort.mb", 1);
     conf.setInputFormat(SequenceFileInputFormat.class);
     conf.setInputPath(inDir);

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMapRed.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMapRed.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMapRed.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMapRed.java Mon Mar 10 11:53:58
2008
@@ -292,7 +292,7 @@
     Path inDir = new Path(testdir, "in");
     Path outDir = new Path(testdir, "out");
     FileSystem fs = FileSystem.get(conf);
-    fs.delete(testdir);
+    fs.delete(testdir, true);
     conf.setInputPath(inDir);
     conf.setOutputPath(outDir);
     conf.setMapperClass(MyMap.class);
@@ -332,7 +332,7 @@
                    rdr.isCompressed());
       rdr.close();
     } finally {
-      fs.delete(testdir);
+      fs.delete(testdir, true);
     }
   }
     
@@ -415,7 +415,7 @@
     // file of random numbers.
     //
     Path randomOuts = new Path(testdir, "genouts");
-    fs.delete(randomOuts);
+    fs.delete(randomOuts, true);
 
 
     JobConf genJob = new JobConf(conf, TestMapRed.class);
@@ -462,7 +462,7 @@
     //
     int intermediateReduces = 10;
     Path intermediateOuts = new Path(testdir, "intermediateouts");
-    fs.delete(intermediateOuts);
+    fs.delete(intermediateOuts, true);
     JobConf checkJob = new JobConf(conf, TestMapRed.class);
     checkJob.setInputPath(randomOuts);
     checkJob.setInputFormat(TextInputFormat.class);
@@ -485,7 +485,7 @@
     // all the files.
     //
     Path finalOuts = new Path(testdir, "finalouts");        
-    fs.delete(finalOuts);
+    fs.delete(finalOuts, true);
     JobConf mergeJob = new JobConf(conf, TestMapRed.class);
     mergeJob.setInputPath(intermediateOuts);
     mergeJob.setInputFormat(SequenceFileInputFormat.class);
@@ -556,7 +556,7 @@
     } finally {
       bw.close();
     }
-    fs.delete(testdir);
+    fs.delete(testdir, true);
   }
 
   /**
@@ -591,7 +591,7 @@
       Path inDir = new Path(testdir, "in");
       Path outDir = new Path(testdir, "out");
       FileSystem fs = FileSystem.get(conf);
-      fs.delete(testdir);
+      fs.delete(testdir, true);
       conf.setInt("io.sort.mb", 1);
       conf.setInputFormat(SequenceFileInputFormat.class);
       conf.setInputPath(inDir);

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRClasspath.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRClasspath.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRClasspath.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRClasspath.java Mon Mar 10
11:53:58 2008
@@ -45,7 +45,7 @@
     final Path inDir = new Path("/testing/wc/input");
     final Path outDir = new Path("/testing/wc/output");
     FileSystem fs = FileSystem.getNamed(fileSys, conf);
-    fs.delete(outDir);
+    fs.delete(outDir, true);
     if (!fs.mkdirs(inDir)) {
       throw new IOException("Mkdirs failed to create " + inDir.toString());
     }
@@ -101,7 +101,7 @@
     final Path inDir = new Path("/testing/ext/input");
     final Path outDir = new Path("/testing/ext/output");
     FileSystem fs = FileSystem.getNamed(fileSys, conf);
-    fs.delete(outDir);
+    fs.delete(outDir, true);
     if (!fs.mkdirs(inDir)) {
       throw new IOException("Mkdirs failed to create " + inDir.toString());
     }

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRLocalFS.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRLocalFS.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRLocalFS.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRLocalFS.java Mon Mar 10
11:53:58 2008
@@ -86,7 +86,7 @@
     Path testDir = new Path(TEST_ROOT_DIR + "/test_mini_mr_local");
     Path outDir = new Path(testDir, "out");
     System.out.println("testDir= " + testDir);
-    fileSys.delete(testDir);
+    fileSys.delete(testDir, true);
     
     job.setInputFormat(MyInputFormat.class);
     job.setOutputFormat(MyOutputFormat.class);
@@ -111,7 +111,7 @@
                               "eggs\t2\n" + 
                               "finagle the agent\t3\n"), result);
     } finally {
-      fileSys.delete(testDir);
+      fileSys.delete(testDir, true);
     }
     
   }

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRMapRedDebugScript.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRMapRedDebugScript.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRMapRedDebugScript.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRMapRedDebugScript.java Mon
Mar 10 11:53:58 2008
@@ -115,7 +115,7 @@
     // set up the input file system and write input text.
     FileSystem inFs = inDir.getFileSystem(conf);
     FileSystem outFs = outDir.getFileSystem(conf);
-    outFs.delete(outDir);
+    outFs.delete(outDir, true);
     if (!inFs.mkdirs(inDir)) {
       throw new IOException("Mkdirs failed to create " + inDir.toString());
     }

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRTaskTempDir.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRTaskTempDir.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRTaskTempDir.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRTaskTempDir.java Mon Mar
10 11:53:58 2008
@@ -96,7 +96,7 @@
     // set up the input file system and write input text.
     FileSystem inFs = inDir.getFileSystem(conf);
     FileSystem outFs = outDir.getFileSystem(conf);
-    outFs.delete(outDir);
+    outFs.delete(outDir, true);
     if (!inFs.mkdirs(inDir)) {
       throw new IOException("Mkdirs failed to create " + inDir.toString());
     }
@@ -122,17 +122,17 @@
     // Launch job with default option for temp dir. 
     // i.e. temp dir is ./tmp 
     JobClient.runJob(conf);
-    outFs.delete(outDir);
+    outFs.delete(outDir, true);
 
     // Launch job by giving relative path to temp dir.
     conf.set("mapred.child.tmp", "../temp");
     JobClient.runJob(conf);
-    outFs.delete(outDir);
+    outFs.delete(outDir, true);
 
     // Launch job by giving absolute path to temp dir
     conf.set("mapred.child.tmp", "/tmp");
     JobClient.runJob(conf);
-    outFs.delete(outDir);
+    outFs.delete(outDir, true);
   }
 
   /**

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRWithDFS.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRWithDFS.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRWithDFS.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMiniMRWithDFS.java Mon Mar 10
11:53:58 2008
@@ -59,7 +59,7 @@
                                            int numReduces) throws IOException {
     FileSystem inFs = inDir.getFileSystem(conf);
     FileSystem outFs = outDir.getFileSystem(conf);
-    outFs.delete(outDir);
+    outFs.delete(outDir, true);
     if (!inFs.mkdirs(inDir)) {
       throw new IOException("Mkdirs failed to create " + inDir.toString());
     }

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMultiFileInputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMultiFileInputFormat.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMultiFileInputFormat.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMultiFileInputFormat.java Mon
Mar 10 11:53:58 2008
@@ -57,7 +57,7 @@
   private Path initFiles(FileSystem fs, int numFiles, int numBytes) throws IOException{
     Path dir = new Path(System.getProperty("test.build.data",".") + "/mapred");
     Path multiFileDir = new Path(dir, "test.multifile");
-    fs.delete(multiFileDir);
+    fs.delete(multiFileDir, true);
     fs.mkdirs(multiFileDir);
     LOG.info("Creating " + numFiles + " file(s) in " + multiFileDir);
     for(int i=0; i<numFiles ;i++) {
@@ -119,7 +119,7 @@
         }
       }
       assertEquals(bits.cardinality(), numFiles);
-      fs.delete(dir);
+      fs.delete(dir, true);
     }
     LOG.info("Test Finished");
   }

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestRackAwareTaskPlacement.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestRackAwareTaskPlacement.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestRackAwareTaskPlacement.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestRackAwareTaskPlacement.java Mon
Mar 10 11:53:58 2008
@@ -96,7 +96,7 @@
       mr = new MiniMRCluster(taskTrackers, namenode, 1, rack2, hosts4);
       JobConf jobConf = mr.createJobConf();
       if (fileSys.exists(outputPath)) {
-        fileSys.delete(outputPath);
+        fileSys.delete(outputPath, true);
       }
       /* The job is configured with three maps since there are three 
        * (non-splittable) files. On rack2, there are two files and both
@@ -118,7 +118,7 @@
       jobConf = mr.createJobConf();
       fileSys = dfs.getFileSystem();
       if (fileSys.exists(outputPath)) {
-        fileSys.delete(outputPath);
+        fileSys.delete(outputPath, true);
       }
       /* The job is configured with three maps since there are three 
        * (non-splittable) files. On rack1, because of the way in which repl

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSequenceFileAsBinaryInputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSequenceFileAsBinaryInputFormat.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSequenceFileAsBinaryInputFormat.java
(original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSequenceFileAsBinaryInputFormat.java
Mon Mar 10 11:53:58 2008
@@ -41,7 +41,7 @@
     long seed = r.nextLong();
     r.setSeed(seed);
 
-    fs.delete(dir);
+    fs.delete(dir, true);
     job.setInputPath(dir);
 
     Text tkey = new Text();

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSequenceFileAsTextInputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSequenceFileAsTextInputFormat.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSequenceFileAsTextInputFormat.java
(original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSequenceFileAsTextInputFormat.java
Mon Mar 10 11:53:58 2008
@@ -46,7 +46,7 @@
     //LOG.info("seed = "+seed);
     Random random = new Random(seed);
 
-    fs.delete(dir);
+    fs.delete(dir, true);
 
     job.setInputPath(dir);
 

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSequenceFileInputFilter.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSequenceFileInputFilter.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSequenceFileInputFilter.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSequenceFileInputFilter.java Mon
Mar 10 11:53:58 2008
@@ -106,7 +106,7 @@
     SequenceFileInputFilter.RegexFilter.setPattern(job, "\\A10*");
     
     // clean input dir
-    fs.delete(inDir);
+    fs.delete(inDir, true);
   
     // for a variety of lengths
     for (int length = 1; length < MAX_LENGTH;
@@ -118,7 +118,7 @@
     }
     
     // clean up
-    fs.delete(inDir);
+    fs.delete(inDir, true);
   }
 
   public void testPercentFilter() throws Exception {
@@ -129,7 +129,7 @@
     SequenceFileInputFilter.PercentFilter.setFrequency(job, 1000);
       
     // clean input dir
-    fs.delete(inDir);
+    fs.delete(inDir, true);
     
     // for a variety of lengths
     for (int length = 0; length < MAX_LENGTH;
@@ -145,7 +145,7 @@
     }
       
     // clean up
-    fs.delete(inDir);
+    fs.delete(inDir, true);
   }
   
   public void testMD5Filter() throws Exception {
@@ -156,7 +156,7 @@
     SequenceFileInputFilter.MD5Filter.setFrequency(job, 1000);
       
     // clean input dir
-    fs.delete(inDir);
+    fs.delete(inDir, true);
     
     // for a variety of lengths
     for (int length = 0; length < MAX_LENGTH;
@@ -166,7 +166,7 @@
       LOG.info("Accepted "+countRecords(0)+" records");
     }
     // clean up
-    fs.delete(inDir);
+    fs.delete(inDir, true);
   }
 
   public static void main(String[] args) throws Exception {

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSequenceFileInputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSequenceFileInputFormat.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSequenceFileInputFormat.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSequenceFileInputFormat.java Mon
Mar 10 11:53:58 2008
@@ -46,7 +46,7 @@
     //LOG.info("seed = "+seed);
     Random random = new Random(seed);
 
-    fs.delete(dir);
+    fs.delete(dir, true);
 
     job.setInputPath(dir);
 

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSpecialCharactersInOutputPath.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSpecialCharactersInOutputPath.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSpecialCharactersInOutputPath.java
(original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestSpecialCharactersInOutputPath.java
Mon Mar 10 11:53:58 2008
@@ -53,7 +53,7 @@
     final Path inDir = new Path("/testing/input");
     final Path outDir = new Path("/testing/output");
     FileSystem fs = FileSystem.getNamed(fileSys, conf);
-    fs.delete(outDir);
+    fs.delete(outDir, true);
     if (!fs.mkdirs(inDir)) {
       LOG.warn("Can't create " + inDir);
       return false;

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestTextInputFormat.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestTextInputFormat.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestTextInputFormat.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestTextInputFormat.java Mon Mar 10
11:53:58 2008
@@ -59,7 +59,7 @@
     LOG.info("seed = "+seed);
     Random random = new Random(seed);
 
-    localFs.delete(workDir);
+    localFs.delete(workDir, true);
     job.setInputPath(workDir);
 
     // for a variety of lengths
@@ -200,7 +200,7 @@
     JobConf job = new JobConf();
     CompressionCodec gzip = new GzipCodec();
     ReflectionUtils.setConf(gzip, job);
-    localFs.delete(workDir);
+    localFs.delete(workDir, true);
     writeFile(localFs, new Path(workDir, "part1.txt.gz"), gzip, 
               "the quick\nbrown\nfox jumped\nover\n the lazy\n dog\n");
     writeFile(localFs, new Path(workDir, "part2.txt.gz"), gzip,
@@ -233,7 +233,7 @@
     JobConf job = new JobConf();
     CompressionCodec gzip = new GzipCodec();
     ReflectionUtils.setConf(gzip, job);
-    localFs.delete(workDir);
+    localFs.delete(workDir, true);
     writeFile(localFs, new Path(workDir, "empty.gz"), gzip, "");
     job.setInputPath(workDir);
     TextInputFormat format = new TextInputFormat();

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/ThreadedMapBenchmark.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/ThreadedMapBenchmark.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/ThreadedMapBenchmark.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/ThreadedMapBenchmark.java Mon Mar
10 11:53:58 2008
@@ -218,7 +218,7 @@
     job.setOutputPath(INPUT_DIR);
     
     FileSystem fs = FileSystem.get(job);
-    fs.delete(BASE_DIR);
+    fs.delete(BASE_DIR, true);
     
     LOG.info("Generating random input for the benchmark");
     LOG.info("Total data : " + totalDataSize + " mb");
@@ -315,7 +315,7 @@
       
       LOG.info("Total time taken : " + String.valueOf(endTime - startTime) 
                + " millisec");
-      fs.delete(OUTPUT_DIR);
+      fs.delete(OUTPUT_DIR, true);
       
       // set io.sort.mb to have multiple spills
       JobConf spilledJob = new JobConf(job, ThreadedMapBenchmark.class);
@@ -335,7 +335,7 @@
                + " millisec");
     } finally {
       if (fs != null) {
-        fs.delete(BASE_DIR);
+        fs.delete(BASE_DIR, true);
       }
     }
     return 0;

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/jobcontrol/JobControlTestUtils.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/jobcontrol/JobControlTestUtils.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/jobcontrol/JobControlTestUtils.java
(original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/jobcontrol/JobControlTestUtils.java
Mon Mar 10 11:53:58 2008
@@ -59,7 +59,7 @@
    * @throws IOException If an error occurs cleaning the data.
    */
   static void cleanData(FileSystem fs, Path dirPath) throws IOException {
-    fs.delete(dirPath);
+    fs.delete(dirPath, true);
   }
 
   /**

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/join/TestDatamerge.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/join/TestDatamerge.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/join/TestDatamerge.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/join/TestDatamerge.java Mon Mar 10
11:53:58 2008
@@ -228,7 +228,7 @@
     job.setOutputKeyClass(IntWritable.class);
     job.setOutputValueClass(IntWritable.class);
     JobClient.runJob(job);
-    base.getFileSystem(job).delete(base);
+    base.getFileSystem(job).delete(base, true);
   }
 
   public void testSimpleInnerJoin() throws Exception {

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/lib/aggregate/TestAggregates.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/lib/aggregate/TestAggregates.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/lib/aggregate/TestAggregates.java
(original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/lib/aggregate/TestAggregates.java
Mon Mar 10 11:53:58 2008
@@ -47,9 +47,9 @@
     Path OUTPUT_DIR = new Path("build/test/output_for_aggregates_test");
     Path INPUT_DIR = new Path("build/test/input_for_aggregates_test");
     String inputFile = "input.txt";
-    fs.delete(INPUT_DIR);
+    fs.delete(INPUT_DIR, true);
     fs.mkdirs(INPUT_DIR);
-    fs.delete(OUTPUT_DIR);
+    fs.delete(OUTPUT_DIR, true);
 
     StringBuffer inputData = new StringBuffer();
     StringBuffer expectedOutput = new StringBuffer();
@@ -114,7 +114,7 @@
 
     assertEquals(expectedOutput.toString(),outdata);
     //fs.delete(OUTPUT_DIR);
-    fs.delete(INPUT_DIR);
+    fs.delete(INPUT_DIR, true);
   }
 
   /**

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/record/TestRecordMR.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/record/TestRecordMR.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/record/TestRecordMR.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/record/TestRecordMR.java Mon Mar 10 11:53:58
2008
@@ -304,7 +304,7 @@
     // file of random numbers.
     //
     Path randomOuts = new Path(testdir, "genouts");
-    fs.delete(randomOuts);
+    fs.delete(randomOuts, true);
 
 
     JobConf genJob = new JobConf(conf, TestRecordMR.class);
@@ -351,7 +351,7 @@
     //
     int intermediateReduces = 10;
     Path intermediateOuts = new Path(testdir, "intermediateouts");
-    fs.delete(intermediateOuts);
+    fs.delete(intermediateOuts, true);
     JobConf checkJob = new JobConf(conf, TestRecordMR.class);
     checkJob.setInputPath(randomOuts);
     checkJob.setInputFormat(SequenceFileInputFormat.class);
@@ -374,7 +374,7 @@
     // all the files.
     //
     Path finalOuts = new Path(testdir, "finalouts");        
-    fs.delete(finalOuts);
+    fs.delete(finalOuts, true);
     JobConf mergeJob = new JobConf(conf, TestRecordMR.class);
     mergeJob.setInputPath(intermediateOuts);
     mergeJob.setInputFormat(SequenceFileInputFormat.class);
@@ -445,7 +445,7 @@
     } finally {
       bw.close();
     }
-    fs.delete(testdir);
+    fs.delete(testdir, true);
   }
 
   /**

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/record/TestRecordWritable.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/record/TestRecordWritable.java?rev=635650&r1=635649&r2=635650&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/record/TestRecordWritable.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/record/TestRecordWritable.java Mon Mar 10
11:53:58 2008
@@ -50,7 +50,7 @@
     //LOG.info("seed = "+seed);
     Random random = new Random(seed);
 
-    fs.delete(dir);
+    fs.delete(dir, true);
 
     job.setInputPath(dir);
 



Mime
View raw message