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

Method getNext

src/org/apache/pig/impl/io/ReadToEndLoader.java:212–233  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

210 }
211
212 @Override
213 public Tuple getNext() throws IOException {
214 try {
215 Tuple t = null;
216 if(reader == null) {
217 // first call
218 return getNextHelper();
219 } else {
220 // we already have a reader initialized
221 t = wrappedLoadFunc.getNext();
222 if(t != null) {
223 return t;
224 }
225 // if loadfunc returned null, we need to read next split
226 // if there is one
227 updateCurSplitIndex();
228 return getNextHelper();
229 }
230 } catch (InterruptedException e) {
231 throw new IOException(e);
232 }
233 }
234
235 private Tuple getNextHelper() throws IOException, InterruptedException {
236 Tuple t = null;

Callers 10

testLFPigMethod · 0.95
testLFTextMethod · 0.95
testSFPigMethod · 0.95
initMethod · 0.95
loadMethod · 0.95
execMethod · 0.95
getSchemaMethod · 0.95
getNextHelperMethod · 0.45

Calls 2

getNextHelperMethod · 0.95
updateCurSplitIndexMethod · 0.95

Tested by 4

testLFPigMethod · 0.76
testLFTextMethod · 0.76
testSFPigMethod · 0.76