Initial import into git.
[galago.git] / java / pig-galago / test / com / yahoo / pig / PigServerTest.java
blob826aa02d3d7f2f4c4924e8f6707a6b06fda94403
1 /*
2 * PigServerTest.java
3 * JUnit based test
5 * Created on September 3, 2007, 11:47 AM
6 */
8 package com.yahoo.pig;
10 import com.yahoo.pig.PigServer.ExecType;
11 import java.io.BufferedReader;
12 import java.io.FileInputStream;
13 import junit.framework.*;
15 /**
17 * @author trevor
19 public class PigServerTest extends TestCase {
21 public PigServerTest(String testName) {
22 super(testName);
25 protected void setUp() throws Exception {
28 protected void tearDown() throws Exception {
31 public void testRegisterQuery() throws Exception {
32 System.out.println("registerQuery");
34 String lineOne = "a = load '/Users/trevor/Desktop/data.txt' as (f1, f2, f3);";
35 String lineTwo = "b = FOREACH a GENERATE f1, f2;";
36 String lineThree = "c = COGROUP b BY f1, b BY f2;";
37 PigServer instance = null;
39 instance = new PigServer( ExecType.GALAGO );
40 instance.registerQuery( lineOne );
41 instance.registerQuery( lineTwo );
42 instance.registerQuery( lineThree );
43 instance.store( "b", "/tmp/outdb" );