pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r693303 - in /incubator/pig/branches/types: src/org/apache/pig/impl/builtin/ShellBagEvalFunc.java test/org/apache/pig/test/TestBuiltin.java
Date Mon, 08 Sep 2008 22:30:46 GMT
Author: gates
Date: Mon Sep  8 15:30:40 2008
New Revision: 693303

URL: http://svn.apache.org/viewvc?rev=693303&view=rev
Log:
PIG-327 Removed ShellBagEvalFunc, as it's functionality is replaced by streaming.


Removed:
    incubator/pig/branches/types/src/org/apache/pig/impl/builtin/ShellBagEvalFunc.java
Modified:
    incubator/pig/branches/types/test/org/apache/pig/test/TestBuiltin.java

Modified: incubator/pig/branches/types/test/org/apache/pig/test/TestBuiltin.java
URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/test/org/apache/pig/test/TestBuiltin.java?rev=693303&r1=693302&r2=693303&view=diff
==============================================================================
--- incubator/pig/branches/types/test/org/apache/pig/test/TestBuiltin.java (original)
+++ incubator/pig/branches/types/test/org/apache/pig/test/TestBuiltin.java Mon Sep  8 15:30:40
2008
@@ -37,7 +37,6 @@
 import org.apache.pig.backend.executionengine.ExecException;
 import org.apache.pig.builtin.*;
 import org.apache.pig.data.*;
-import org.apache.pig.impl.builtin.ShellBagEvalFunc;
 import org.apache.pig.impl.io.FileLocalizer;
 import org.apache.pig.impl.io.BufferedPositionedInputStream;
 import org.apache.pig.impl.PigContext;
@@ -892,69 +891,6 @@
         assertTrue(f1.equals(f2));        
     }
     
-    /*@Test
-    public void testShellFuncSingle() throws Throwable {
-        //ShellBagEvalFunc func = new ShellBagEvalFunc("tr o 0");
-        PigServer pig = new PigServer(initString);
-        
-        File tempFile = File.createTempFile("tmp", ".dat");
-        PrintWriter writer = new PrintWriter(tempFile);
-        writer.println("foo");
-        writer.println("boo");
-        writer.close();
-        
-        pig.registerFunction("myTr", new FuncSpec(ShellBagEvalFunc.class.getName() + "('tr
o 0')"));
-        pig.registerQuery("a = load 'file:" + tempFile + "';");
-        pig.registerQuery("b = foreach a generate myTr(*);");
-        Iterator<Tuple> iter = pig.openIterator("b");
-                
-        Tuple t;
-        
-        assertTrue(iter.hasNext());
-        t = iter.next();
-        assertEquals("{(f00)}", t.get(0).toString());
-        assertTrue(iter.hasNext());
-        t = iter.next();
-        assertEquals("{(b00)}", t.get(0).toString());
-        assertFalse(iter.hasNext());
-        tempFile.delete();
-    }
-    
-    @Test
-    public void testShellFuncMultiple() throws Throwable {
-
-        PigServer pig = new PigServer(initString);
-        final int numTimes = 100;
-        
-        File tempFile = File.createTempFile("tmp", ".dat");
-        PrintWriter writer = new PrintWriter(tempFile);
-        for (int i=0; i< numTimes; i++){
-            writer.println(i+"oo");
-        }
-        writer.close();
-        
-        pig.registerFunction("tr1",
-            new FuncSpec(ShellBagEvalFunc.class.getName() + "('tr o A')"));
-        pig.registerFunction("tr2",
-            new FuncSpec(ShellBagEvalFunc.class.getName() + "('tr o B')"));
-        pig.registerQuery("a = load 'file:" + tempFile + "';");
-        pig.registerQuery("b = foreach a generate tr1(*),tr2(*);");
-        Iterator<Tuple> iter = pig.openIterator("b");
-        
-        for (int i=0; i< numTimes; i++){
-            Tuple t = iter.next();
-            DataBag b = DataType.toBag(t.get(0));
-            Tuple t1 = b.iterator().next();
-            assertEquals(i+"AA", t1.get(0).toString());
-            b = DataType.toBag(t.get(1));
-            t1 = b.iterator().next();
-            assertEquals(i+"BB", t1.get(0).toString());
-        }
-        
-        assertFalse(iter.hasNext());
-        tempFile.delete();
-    }*/
-           
     private static String getInputType(String typeFor) {
         return allowedInput.get(typeFor);
     }



Mime
View raw message