scrollId = scroll.getScrollId(); batch = scroll.getHits(); finished = scroll.isConcluded(); scrollId = scroll.getScrollId(); batch = scroll.getHits(); finished = scroll.isConcluded();
@Override public boolean hasNext() { if (finished) return false; if (batch.isEmpty() || batchIndex >= batch.size()) { if (read >= size) { finished = true; return false; } try { Scroll scroll = repository.scroll(scrollId, reader); scrollId = scroll.getScrollId(); batch = scroll.getHits(); } catch (IOException ex) { throw new EsHadoopIllegalStateException("Cannot retrieve scroll [" + scrollId + "]", ex); } read += batch.size(); stats.docsReceived += batch.size(); if (batch.isEmpty()) { finished = true; return false; } // reset index batchIndex = 0; } return true; }
scrollId = scroll.getScrollId(); batch = scroll.getHits(); finished = scroll.isConcluded(); scrollId = scroll.getScrollId(); batch = scroll.getHits(); finished = scroll.isConcluded();
scrollId = scroll.getScrollId(); batch = scroll.getHits(); finished = scroll.isConcluded(); scrollId = scroll.getScrollId(); batch = scroll.getHits(); finished = scroll.isConcluded();
scrollId = scroll.getScrollId(); batch = scroll.getHits(); finished = scroll.isConcluded(); scrollId = scroll.getScrollId(); batch = scroll.getHits(); finished = scroll.isConcluded();