pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From y...@apache.org
Subject svn commit: r957399 - in /hadoop/pig/trunk/contrib/zebra: ./ src/test/org/apache/hadoop/zebra/pig/
Date Thu, 24 Jun 2010 01:10:50 GMT
Author: yanz
Date: Thu Jun 24 01:10:49 2010
New Revision: 957399

URL: http://svn.apache.org/viewvc?rev=957399&view=rev
Log:
PIG-1453 Intermittent failure in pigtest (yanz)

Modified:
    hadoop/pig/trunk/contrib/zebra/CHANGES.txt
    hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestCogroup.java
    hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestMergeJoinPrune.java
    hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestOrderPreserveUnion.java
    hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestOrderPreserveUnionHDFS.java
    hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestSortedTableUnion.java
    hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestSortedTableUnionMergeJoin.java
    hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestSortedTableUnionSourceTableProj.java
    hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableMergeJoin.java
    hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableMergeJoinAfterFilter.java
    hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableMergeJoinMultipleColsSort.java
    hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableSortStorer.java
    hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableSortStorerDesc.java

Modified: hadoop/pig/trunk/contrib/zebra/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/contrib/zebra/CHANGES.txt?rev=957399&r1=957398&r2=957399&view=diff
==============================================================================
--- hadoop/pig/trunk/contrib/zebra/CHANGES.txt (original)
+++ hadoop/pig/trunk/contrib/zebra/CHANGES.txt Thu Jun 24 01:10:49 2010
@@ -90,6 +90,8 @@ Trunk (unreleased changes)
 
   BUG FIXES
 
+    PIG-1453 Intermittent failure in pigtest (yanz)
+
     PIG-1432 There are some debuging info output to STDOUT in PIG's TableStorer call path
(yanz)
 
     PIG-1421 Name node calls made by each mapper (xuefuz via yanz)

Modified: hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestCogroup.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestCogroup.java?rev=957399&r1=957398&r2=957399&view=diff
==============================================================================
--- hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestCogroup.java (original)
+++ hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestCogroup.java Thu
Jun 24 01:10:49 2010
@@ -105,6 +105,7 @@ public class TestCogroup extends BaseTes
   @AfterClass
   public static void tearDown() throws Exception {
     pigServer.shutdown();
+    removeDir(pathTable);
   }
 
   /**
@@ -167,9 +168,9 @@ public class TestCogroup extends BaseTes
     String foreach = "records6 = foreach records5 generate flatten(records3), flatten(records4);";
     pigServer.registerQuery(foreach);
 
-    Path newPath = new Path("testStorer");
+    Path newPath = new Path("TestCogroup.testStorer");
     System.out.println("newPath = " + newPath);
-    removeDir(newPath);
+    removeDir(getTableFullPath(newPath.toString()+"1"));
 
     /*
      * Table1 creation
@@ -182,6 +183,6 @@ public class TestCogroup extends BaseTes
                 + "('[records3::SF_a]; [records4::SF_a]')");
     Assert.assertNull(pigJob.getException());
     
-    removeDir(newPath);
+    removeDir(getTableFullPath(newPath.toString()+"1"));
   }
 }

Modified: hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestMergeJoinPrune.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestMergeJoinPrune.java?rev=957399&r1=957398&r2=957399&view=diff
==============================================================================
--- hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestMergeJoinPrune.java
(original)
+++ hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestMergeJoinPrune.java
Thu Jun 24 01:10:49 2010
@@ -392,7 +392,7 @@ public class TestMergeJoinPrune extends 
     t1++;
     
     String table1path = pathTable1.toString() + Integer.toString(t1);
-     
+    removeDir(new Path(table1path));
 
 ExecJob pigJob =pigServer.store("sort1", table1path, TableStorer.class.getCanonicalName()
         + "('[a, b, c]; [d, e, f, r1, m1]')");
@@ -415,6 +415,7 @@ Assert.assertNull(pigJob.getException())
      */
     this.t1++;
     String table2path = this.pathTable2.toString() + Integer.toString(this.t1);
+    removeDir(new Path(table2path));
     pigJob = pigServer.store("sort2", table2path, TableStorer.class.getCanonicalName()
         + "('[a, b, c]; [d,e,f,r1,m1]')");
     if (pigJob.getException() != null){

Modified: hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestOrderPreserveUnion.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestOrderPreserveUnion.java?rev=957399&r1=957398&r2=957399&view=diff
==============================================================================
--- hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestOrderPreserveUnion.java
(original)
+++ hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestOrderPreserveUnion.java
Thu Jun 24 01:10:49 2010
@@ -21,6 +21,8 @@ package org.apache.hadoop.zebra.pig;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.StringTokenizer;
 
@@ -90,6 +92,7 @@ public class TestOrderPreserveUnion exte
   @AfterClass
   public static void tearDown() throws Exception {
     pigServer.shutdown();
+    removeDir(pathTable);
   }
 
   /**
@@ -153,12 +156,14 @@ public class TestOrderPreserveUnion exte
     /*
      * Table1 creation
      */
+    removeDir(getTableFullPath(newPath.toString()+"1"));
     pigServer
         .store(
             "srecs",
             newPath.toString()+"1",
             TableStorer.class.getCanonicalName()
                 + "('[SF_a, SF_b, SF_c]; [SF_e]')");
+    removeDir(getTableFullPath(newPath.toString()+"2"));
     pigServer
         .store(
             "srecs",
@@ -173,26 +178,37 @@ public class TestOrderPreserveUnion exte
         + "' USING org.apache.hadoop.zebra.pig.TableLoader('SF_a, source_table, SF_b', 'sorted');";
     pigServer.registerQuery(query4);
 
-    // check JOIN content
-    Iterator<Tuple> it3 = pigServer.openIterator("records2");
-    int row = 0, index, tindex = -1;
-    Tuple RowValue3 = null;
-    while (it3.hasNext()) {
-      // Last row value
-      RowValue3 = it3.next();
-      Assert.assertEquals(3, RowValue3.size());
-      index = row;
-      if (index > 9)
-        index -= 10;
-      row++;
-      if (row == 1)
-        tindex = (Integer) RowValue3.get(1);
-      else if (row == 11)
-        tindex = 1 - tindex;
-      Assert.assertEquals(index+"_00", RowValue3.get(0));
-      Assert.assertEquals(index+"_01", RowValue3.get(2));
-      Assert.assertEquals(tindex, RowValue3.get(1));
-    }
+    HashMap<Integer, ArrayList<ArrayList<Object>>> resultTable
+    = new HashMap<Integer, ArrayList<ArrayList<Object>>>();
+
+    ArrayList<ArrayList<Object>> rows = new ArrayList<ArrayList<Object>>();
+    
+    for (int i = 0; i < 10; i++)
+      addResultRow(rows, i+"_00", 0, i+"_01");
+    resultTable.put(0, rows);
+    
+    rows = new ArrayList<ArrayList<Object>>();
+    for (int i = 0; i < 10; i++)
+      addResultRow(rows, i+"_00", 1,  i+"_01");
+    resultTable.put(1, rows);
+
+ // Verify union table
+    Iterator<Tuple> it = pigServer.openIterator("records2");
+    int row = verifyTable(resultTable, 0, 1, it);
+    
     Assert.assertEquals(20, row);
   }
+  
+  /**
+   *Add a row to expected results table
+   * 
+   */
+  private void addResultRow(ArrayList<ArrayList<Object>> resultTable, Object
... values) {
+    ArrayList<Object> resultRow = new ArrayList<Object>();
+    
+    for (int i = 0; i < values.length; i++) {
+      resultRow.add(values[i]);
+    }
+    resultTable.add(resultRow);
+  }
 } 

Modified: hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestOrderPreserveUnionHDFS.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestOrderPreserveUnionHDFS.java?rev=957399&r1=957398&r2=957399&view=diff
==============================================================================
--- hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestOrderPreserveUnionHDFS.java
(original)
+++ hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestOrderPreserveUnionHDFS.java
Thu Jun 24 01:10:49 2010
@@ -19,6 +19,7 @@
 package org.apache.hadoop.zebra.pig;
 
 import java.io.IOException;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.ArrayList;
 
@@ -137,12 +138,14 @@ public class TestOrderPreserveUnionHDFS 
 		
 		// Store sorted tables
 		++fileId;  // increment filename suffix
-		String pathSort1 = pathTable1.toString() + Integer.toString(fileId);
+		String pathSort1 = "TestOrderPerserveSimple1" + Integer.toString(fileId);
+	  removeDir(getTableFullPath(pathSort1));
 		pigJob = pigServer.store("sort1", pathSort1, TableStorer.class.getCanonicalName() +
 			"('[a, b]; [c]')");
 		Assert.assertNull(pigJob.getException());
 		
-		String pathSort2 = pathTable2.toString() + Integer.toString(fileId);
+		String pathSort2 = "TestOrderPerserveSimple2" + Integer.toString(fileId);
+	  removeDir(getTableFullPath(pathSort2));
 		pigJob = pigServer.store("sort2", pathSort2, TableStorer.class.getCanonicalName() +
 			"('[a, b]; [c]')");
 		Assert.assertNull(pigJob.getException());
@@ -150,109 +153,37 @@ public class TestOrderPreserveUnionHDFS 
 		String queryLoad = "records1 = LOAD '"
 	        + pathSort1 + ","
 	        + pathSort2
-	        +	"' USING org.apache.hadoop.zebra.pig.TableLoader('a,b,c', 'sorted');";
+	        +	"' USING org.apache.hadoop.zebra.pig.TableLoader('a,b,c, source_table', 'sorted');";
 		
 		System.out.println("queryLoad: " + queryLoad);
 		
 		pigServer.registerQuery(queryLoad);
 		
 		// Verify union table
-		ArrayList<ArrayList<Object>> resultTable = new ArrayList<ArrayList<Object>>();
-		
-		addResultRow(resultTable, "a1",	"z",	"5");
-		addResultRow(resultTable, "a2",	"r",	"4");
-		addResultRow(resultTable, "a3",	"e",	"3");
-		addResultRow(resultTable, "a4",	"a",	"1");
-		
-		addResultRow(resultTable, "b1",	"a",	"a");
-		addResultRow(resultTable, "b2",	"a",	"a");
-		addResultRow(resultTable, "b3",	"a",	"a");
-		addResultRow(resultTable, "b4",	"a",	"a");
+		HashMap<Integer, ArrayList<ArrayList<Object>>> resultTable
+    = new HashMap<Integer, ArrayList<ArrayList<Object>>>();
+		ArrayList<ArrayList<Object>> rows = new ArrayList<ArrayList<Object>>();
+		addResultRow(rows, "a1",	"z",	"5", 0);
+		addResultRow(rows, "a2",	"r",	"4", 0);
+		addResultRow(rows, "a3",	"e",	"3", 0);
+		addResultRow(rows, "a4",	"a",	"1", 0);
+		resultTable.put(0, rows);
+		
+		rows = new ArrayList<ArrayList<Object>>();
+		addResultRow(rows, "b1",	"a",	"a", 1);
+		addResultRow(rows, "b2",	"a",	"a", 1);
+		addResultRow(rows, "b3",	"a",	"a", 1);
+		addResultRow(rows, "b4",	"a",	"a", 1);
+		resultTable.put(1, rows);
 		
 		// Verify union table
 		Iterator<Tuple> it = pigServer.openIterator("records1");
-		int numbRows = verifyTable(resultTable, 0, it);
+		int numbRows = verifyTable(resultTable, 0, 3, it);
 		
 		Assert.assertEquals(numbRows, table1.length + table2.length);
 	}
 	
 	/**
-	 * Verify union output table with expected results
-	 * 
-	 */
-	private int verifyTable(ArrayList<ArrayList<Object>> resultTable, int keyColumn,
Iterator<Tuple> it) throws IOException {
-		int numbRows = 0;
-		int index = 0;
-		Object value = resultTable.get(index).get(keyColumn);  // get value of primary key
-		
-		while (it.hasNext()) {
-			Tuple rowValues = it.next();
-			
-			// If last primary sort key does match then search for next matching key
-			if (! compareObj(value, rowValues.get(keyColumn))) {
-				int subIndex = index + 1;
-				while (subIndex < resultTable.size()) {
-					if ( ! compareObj(value, resultTable.get(subIndex).get(keyColumn)) ) {  // found new
key
-						index = subIndex;
-						value = resultTable.get(index).get(keyColumn);
-						break;
-					}
-					++subIndex;
-				}
-				Assert.assertEquals("Table comparison error for row : " + numbRows + " - no key found
for : "
-					+ rowValues.get(keyColumn), value, rowValues.get(keyColumn));
-			}
-			// Search for matching row with this primary key
-			int subIndex = index;
-			
-			while (subIndex < resultTable.size()) {
-				// Compare row
-				ArrayList<Object> resultRow = resultTable.get(subIndex);
-				if ( compareRow(rowValues, resultRow) )
-					break; // found matching row
-				++subIndex;
-				Assert.assertEquals("Table comparison error for row : " + numbRows + " - no matching
row found for : "
-					+ rowValues.get(keyColumn), value, resultTable.get(subIndex).get(keyColumn));
-			}
-			++numbRows;
-		}
-		Assert.assertEquals(resultTable.size(), numbRows);  // verify expected row count
-		return numbRows;
-	}
-	
-	/**
-	 * Compare table rows
-	 * 
-	 */
-	private boolean compareRow(Tuple rowValues, ArrayList<Object> resultRow) throws IOException
{
-		boolean result = true;
-		Assert.assertEquals(resultRow.size(), rowValues.size());
-		for (int i = 0; i < rowValues.size(); ++i) {
-			if (! compareObj(rowValues.get(i), resultRow.get(i)) ) {
-				result = false;
-				break;
-			}
-		}
-		return result;
-	}
-	
-	/**
-	 * Compare table values
-	 * 
-	 */
-	private boolean compareObj(Object object1, Object object2) {
-		if (object1 == null) {
-			if (object2 == null)
-				return true;
-			else
-				return false;
-		} else if (object1.equals(object2))
-			return true;
-		else
-			return false;
-	}
-	
-	/**
 	 *Add a row to expected results table
 	 * 
 	 */

Modified: hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestSortedTableUnion.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestSortedTableUnion.java?rev=957399&r1=957398&r2=957399&view=diff
==============================================================================
--- hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestSortedTableUnion.java
(original)
+++ hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestSortedTableUnion.java
Thu Jun 24 01:10:49 2010
@@ -153,6 +153,8 @@ public class TestSortedTableUnion extend
      */
     Path newPath = new Path(getCurrentMethodName());
 
+    removeDir(getTableFullPath(newPath.toString()+"1"));
+    removeDir(getTableFullPath(newPath.toString()+"2"));
     /*
      * Table1 creation
      */

Modified: hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestSortedTableUnionMergeJoin.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestSortedTableUnionMergeJoin.java?rev=957399&r1=957398&r2=957399&view=diff
==============================================================================
--- hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestSortedTableUnionMergeJoin.java
(original)
+++ hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestSortedTableUnionMergeJoin.java
Thu Jun 24 01:10:49 2010
@@ -163,6 +163,9 @@ public class TestSortedTableUnionMergeJo
      */
     Path newPath = new Path(getCurrentMethodName());
 
+    removeDir(getTableFullPath(newPath.toString()+"1"));
+    removeDir(getTableFullPath(newPath.toString()+"2"));
+    
     /*
      * Table1 creation
      */

Modified: hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestSortedTableUnionSourceTableProj.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestSortedTableUnionSourceTableProj.java?rev=957399&r1=957398&r2=957399&view=diff
==============================================================================
--- hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestSortedTableUnionSourceTableProj.java
(original)
+++ hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestSortedTableUnionSourceTableProj.java
Thu Jun 24 01:10:49 2010
@@ -166,12 +166,14 @@ public class TestSortedTableUnionSourceT
     /*
      * Table1 creation
      */
+    removeDir(getTableFullPath(newPath.toString()+"1"));
     pigServer
         .store(
             "srecs",
             newPath.toString()+"1",
             TableStorer.class.getCanonicalName()
                 + "('[SF_a, SF_b, SF_c]; [SF_e]')");
+    removeDir(getTableFullPath(newPath.toString()+"2"));
     pigServer
         .store(
             "srecs",

Modified: hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableMergeJoin.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableMergeJoin.java?rev=957399&r1=957398&r2=957399&view=diff
==============================================================================
--- hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableMergeJoin.java
(original)
+++ hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableMergeJoin.java
Thu Jun 24 01:10:49 2010
@@ -163,7 +163,7 @@ public class TestTableMergeJoin extends 
      * "[SF_a, SF_b, SF_c]; [SF_e, SF_f, SF_g]", false, conf);
      */
     Path newPath = new Path(getCurrentMethodName());
-
+    removeDir(getTableFullPath(newPath.toString()+"1"));
     /*
      * Table1 creation
      */
@@ -195,7 +195,7 @@ public class TestTableMergeJoin extends 
     }
     Assert.assertEquals(10, row);
     */
-    
+    removeDir(getTableFullPath(newPath.toString()+"2"));
     /*
      * Table2 creation
      */

Modified: hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableMergeJoinAfterFilter.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableMergeJoinAfterFilter.java?rev=957399&r1=957398&r2=957399&view=diff
==============================================================================
--- hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableMergeJoinAfterFilter.java
(original)
+++ hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableMergeJoinAfterFilter.java
Thu Jun 24 01:10:49 2010
@@ -167,6 +167,7 @@ public class TestTableMergeJoinAfterFilt
     /*
      * Table1 creation
      */
+    removeDir(getTableFullPath(newPath.toString()+"1"));
     pigServer
         .store(
             "srecs",
@@ -182,6 +183,7 @@ public class TestTableMergeJoinAfterFilt
     /*
      * Table2 creation
      */
+    removeDir(getTableFullPath(newPath.toString()+"2"));
     pigServer
         .store(
             "srecs",

Modified: hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableMergeJoinMultipleColsSort.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableMergeJoinMultipleColsSort.java?rev=957399&r1=957398&r2=957399&view=diff
==============================================================================
--- hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableMergeJoinMultipleColsSort.java
(original)
+++ hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableMergeJoinMultipleColsSort.java
Thu Jun 24 01:10:49 2010
@@ -156,7 +156,7 @@ public class TestTableMergeJoinMultipleC
      * Table1 creation
      */
 
-    
+    removeDir(getTableFullPath(newPath.toString()+"1"));    
     pigServer
         .store(
             "srecs",
@@ -171,7 +171,7 @@ public class TestTableMergeJoinMultipleC
     /*
      * Table2 creation
      */
-
+    removeDir(getTableFullPath(newPath.toString()+"2"));
     pigServer
         .store(
             "srecs",

Modified: hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableSortStorer.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableSortStorer.java?rev=957399&r1=957398&r2=957399&view=diff
==============================================================================
--- hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableSortStorer.java
(original)
+++ hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableSortStorer.java
Thu Jun 24 01:10:49 2010
@@ -159,8 +159,8 @@ public class TestTableSortStorer extends
      * BasicTable.Writer(pathTable, "SF_a,SF_b,SF_c,SF_d,SF_e,SF_f,SF_g",
      * "[SF_a, SF_b, SF_c]; [SF_e, SF_f, SF_g]", false, conf);
      */
-    Path newPath = new Path(getCurrentMethodName());
-
+    Path newPath = getTableFullPath(getCurrentMethodName());
+    removeDir(newPath);
     pigServer
         .store(
             "srecs",

Modified: hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableSortStorerDesc.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableSortStorerDesc.java?rev=957399&r1=957398&r2=957399&view=diff
==============================================================================
--- hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableSortStorerDesc.java
(original)
+++ hadoop/pig/trunk/contrib/zebra/src/test/org/apache/hadoop/zebra/pig/TestTableSortStorerDesc.java
Thu Jun 24 01:10:49 2010
@@ -159,8 +159,8 @@ public class TestTableSortStorerDesc ext
      * BasicTable.Writer(pathTable, "SF_a,SF_b,SF_c,SF_d,SF_e,SF_f,SF_g",
      * "[SF_a, SF_b, SF_c]; [SF_e, SF_f, SF_g]", false, conf);
      */
-    Path newPath = new Path(getCurrentMethodName());
-
+    Path newPath = getTableFullPath(getCurrentMethodName());
+    removeDir(newPath);
     pigServer
         .store(
             "srecs",



Mime
View raw message