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

Method testStore

test/org/apache/pig/test/TestStore.java:175–197  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

173 }
174
175 @Test
176 public void testStore() throws Exception {
177 inpDB = GenRandomData.genRandSmallTupDataBag(new Random(), 10, 100);
178 storeAndCopyLocally(inpDB);
179
180 int size = 0;
181 BufferedReader br = new BufferedReader(new FileReader(outputFileName));
182 for(String line=br.readLine();line!=null;line=br.readLine()){
183 String[] flds = line.split("\t",-1);
184 Tuple t = new DefaultTuple();
185 t.append(flds[0].compareTo("")!=0 ? flds[0] : null);
186 t.append(flds[1].compareTo("")!=0 ? Integer.parseInt(flds[1]) : null);
187
188 System.err.println("Simple data: ");
189 System.err.println(line);
190 System.err.println("t: ");
191 System.err.println(t);
192 assertTrue(TestHelper.bagContains(inpDB, t));
193 ++size;
194 }
195 assertEquals(size, inpDB.size());
196 br.close();
197 }
198
199 /**
200 * @param inpD

Callers

nothing calls this directly

Calls 10

storeAndCopyLocallyMethod · 0.95
appendMethod · 0.95
bagContainsMethod · 0.95
splitMethod · 0.80
sizeMethod · 0.65
closeMethod · 0.65
readLineMethod · 0.45
compareToMethod · 0.45
assertEqualsMethod · 0.45

Tested by

no test coverage detected