()
| 100 | } |
| 101 | |
| 102 | @Test |
| 103 | public void testLargeFile () throws Exception { |
| 104 | System.out.println("Running testLargeFile..."); |
| 105 | pig.registerQuery("A = load " + fileName + ";"); |
| 106 | pig.registerQuery("A = group A by $0;"); |
| 107 | pig.store("A", tmpFile1, "BinStorage()"); |
| 108 | pig.registerQuery("B = foreach A generate group, COUNT($1);"); |
| 109 | |
| 110 | Iterator<Tuple> B = pig.openIterator("B"); |
| 111 | |
| 112 | while (B.hasNext()) { |
| 113 | Tuple temp = B.next(); |
| 114 | int index = DataType.toInteger(temp.get(0)); |
| 115 | int value = DataType.toInteger(temp.get(1)); |
| 116 | System.out.println("COUNT [" + index + "] = " + COUNT[index] + " B[" + index + "] = " + value); |
| 117 | |
| 118 | assertEquals(COUNT[index].intValue(), value); |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | @Test |
| 123 | public void testOrder() throws Exception { |
nothing calls this directly
no test coverage detected