MCPcopy Create free account
hub / github.com/apache/pig / testLargeFile

Method testLargeFile

test/org/apache/pig/test/TestLargeFile.java:102–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 8

toIntegerMethod · 0.95
getMethod · 0.95
openIteratorMethod · 0.80
registerQueryMethod · 0.45
storeMethod · 0.45
hasNextMethod · 0.45
nextMethod · 0.45
assertEqualsMethod · 0.45

Tested by

no test coverage detected