mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r984275 - in /mahout/trunk/examples/src/test/java/org/apache/mahout/ga/watchmaker/cd: DataLineTest.java FileInfosDatasetTest.java hadoop/CDMahoutEvaluatorTest.java
Date Wed, 11 Aug 2010 00:55:35 GMT
Author: drew
Date: Wed Aug 11 00:55:34 2010
New Revision: 984275

URL: http://svn.apache.org/viewvc?rev=984275&view=rev
Log:
Potential fix for failing nightly builds.

Modified:
    mahout/trunk/examples/src/test/java/org/apache/mahout/ga/watchmaker/cd/DataLineTest.java
    mahout/trunk/examples/src/test/java/org/apache/mahout/ga/watchmaker/cd/FileInfosDatasetTest.java
    mahout/trunk/examples/src/test/java/org/apache/mahout/ga/watchmaker/cd/hadoop/CDMahoutEvaluatorTest.java

Modified: mahout/trunk/examples/src/test/java/org/apache/mahout/ga/watchmaker/cd/DataLineTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/src/test/java/org/apache/mahout/ga/watchmaker/cd/DataLineTest.java?rev=984275&r1=984274&r2=984275&view=diff
==============================================================================
--- mahout/trunk/examples/src/test/java/org/apache/mahout/ga/watchmaker/cd/DataLineTest.java
(original)
+++ mahout/trunk/examples/src/test/java/org/apache/mahout/ga/watchmaker/cd/DataLineTest.java
Wed Aug 11 00:55:34 2010
@@ -30,8 +30,9 @@ public class DataLineTest extends Mahout
       "852781,M,18.61,20.25,122.1,1094,0.0944,0.1066,0.149,0.07731,0.1697,0.05699,0.8529,1.849,5.632,93.54,0.01075,0.02722,0.05081,0.01911,0.02293,0.004217,21.31,27.26,139.9,1403,0.1338,0.2117,0.3446,0.149,0.2341,0.07421"
};
 
   public void testSet() throws Exception {
-    Path inpath = new Path(this.getClass().getResource("/wdbc/").getPath());
-    FileSystem fs = FileSystem.get(inpath.toUri(), new Configuration());
+    FileSystem fs = FileSystem.get(new Configuration());
+    Path inpath = fs.makeQualified(new Path(this.getClass().getResource("/wdbc/").getPath()));
+    
     DataSet dataset = FileInfoParser.parseFile(fs, inpath);
     DataSet.initialize(dataset);
     

Modified: mahout/trunk/examples/src/test/java/org/apache/mahout/ga/watchmaker/cd/FileInfosDatasetTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/src/test/java/org/apache/mahout/ga/watchmaker/cd/FileInfosDatasetTest.java?rev=984275&r1=984274&r2=984275&view=diff
==============================================================================
--- mahout/trunk/examples/src/test/java/org/apache/mahout/ga/watchmaker/cd/FileInfosDatasetTest.java
(original)
+++ mahout/trunk/examples/src/test/java/org/apache/mahout/ga/watchmaker/cd/FileInfosDatasetTest.java
Wed Aug 11 00:55:34 2010
@@ -30,8 +30,8 @@ import java.io.File;
 public class FileInfosDatasetTest extends MahoutTestCase {
 
   public void testRanges() throws IOException {
-    Path inpath = new Path(this.getClass().getResource("/wdbc/").getPath());
-    FileSystem fs = FileSystem.get(inpath.toUri(), new Configuration());
+    FileSystem fs = FileSystem.get(new Configuration());
+    Path inpath = fs.makeQualified(new Path(this.getClass().getResource("/wdbc/").getPath()));
     
     DataSet dataset = FileInfoParser.parseFile(fs, inpath);
     DataSet.initialize(dataset);

Modified: mahout/trunk/examples/src/test/java/org/apache/mahout/ga/watchmaker/cd/hadoop/CDMahoutEvaluatorTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/src/test/java/org/apache/mahout/ga/watchmaker/cd/hadoop/CDMahoutEvaluatorTest.java?rev=984275&r1=984274&r2=984275&view=diff
==============================================================================
--- mahout/trunk/examples/src/test/java/org/apache/mahout/ga/watchmaker/cd/hadoop/CDMahoutEvaluatorTest.java
(original)
+++ mahout/trunk/examples/src/test/java/org/apache/mahout/ga/watchmaker/cd/hadoop/CDMahoutEvaluatorTest.java
Wed Aug 11 00:55:34 2010
@@ -46,13 +46,14 @@ public class CDMahoutEvaluatorTest exten
 
     // dataset
     // This is sensitive to the working directory where the test is run:
-    Path input = new Path(this.getClass().getResource("/wdbc/").getPath());
+    FileSystem fs = FileSystem.get(new Configuration());
+    Path input = fs.makeQualified(new Path(this.getClass().getResource("/wdbc/").getPath()));
     CDMahoutEvaluator.initializeDataSet(input);
 
     // evaluate the rules
     List<CDFitness> results = new ArrayList<CDFitness>();
     Path output = getTestTempDirPath("output");
-    FileSystem fs = output.getFileSystem(new Configuration());
+    fs = output.getFileSystem(new Configuration());
     fs.delete(output, true); // It's unhappy if this directory exists
     CDMahoutEvaluator.evaluate(rules, target, input, output, results);
 



Mime
View raw message