@Override public void setInterruptFlag(AtomicBoolean flag) { ((InterruptibleIterator) source).setInterruptFlag(flag); } }
@Override public void setInterruptFlag(AtomicBoolean flag) { this.iflag = flag; ((InterruptibleIterator) this.iter).setInterruptFlag(iflag); } }
@Override public void setInterruptFlag(AtomicBoolean flag) { ((InterruptibleIterator) source).setInterruptFlag(flag); }
@Override public void setInterruptFlag(AtomicBoolean flag) { ((InterruptibleIterator) source).setInterruptFlag(flag); }
@Override public void setInterruptFlag(AtomicBoolean flag) { synchronized (copies) { if (copies.size() != 1) throw new IllegalStateException( "setInterruptFlag() called after deep copies made " + copies.size()); if (iter != null) ((InterruptibleIterator) iter).setInterruptFlag(flag); source.setInterruptFlag(flag); } } }
@Override public void setInterruptFlag(AtomicBoolean flag) { this.interruptFlag = flag; for (LocalityGroup lgr : lgContext.groups) { lgr.getIterator().setInterruptFlag(flag); } }
void setIterator(SortedKeyValueIterator<Key,Value> iter) { current = false; this.iter = iter; if (iflag != null) { ((InterruptibleIterator) this.iter).setInterruptFlag(iflag); } for (FileDataSource fds : deepCopies) { fds.current = false; fds.iter = iter.deepCopy(fds.env); } }
@Override public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) { try { SortedKeyValueIterator<Key,Value> other = env.reserveMapFileReader(dirName); ((InterruptibleIterator) other).setInterruptFlag(interruptFlag); log.debug("deep copying MapFile: {} -> {}", this, other); return other; } catch (IOException e) { log.error("failed to clone map file reader", e); throw new RuntimeException(e); } }
@Override public void setInterruptFlag(AtomicBoolean flag) { ((InterruptibleIterator) getSource()).setInterruptFlag(flag); }
@Override public void setInterruptFlag(AtomicBoolean flag) { ((InterruptibleIterator) getSource()).setInterruptFlag(flag); }
@Override public void setInterruptFlag(AtomicBoolean flag) { ((InterruptibleIterator) getSource()).setInterruptFlag(flag); }
@Override public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) { LocalityGroup[] groupsCopy = new LocalityGroup[lgContext.groups.size()]; for (int i = 0; i < lgContext.groups.size(); i++) { groupsCopy[i] = new LocalityGroup(lgContext.groups.get(i), env); if (interruptFlag != null) groupsCopy[i].getIterator().setInterruptFlag(interruptFlag); } return new LocalityGroupIterator(groupsCopy); }
@Override public SortedKeyValueIterator<Key,Value> iterator() throws IOException { if (iter == null) if (!switched) { iter = map.skvIterator(getSamplerConfig()); if (iflag != null) iter.setInterruptFlag(iflag); } else { if (parent == null) iter = new MemKeyConversionIterator(getReader()); else synchronized (parent) { // synchronize deep copy operation on parent, this prevents multiple threads from deep // copying the rfile shared from parent its possible that the // thread deleting an InMemoryMap and scan thread could be switching different deep // copies iter = new MemKeyConversionIterator(parent.getReader().deepCopy(env)); } } return iter; }
@Override public void setInterruptFlag(AtomicBoolean flag) { ((InterruptibleIterator) source).setInterruptFlag(flag); } }
@Override public SortedKeyValueIterator<Key,Value> iterator() throws IOException { if (iflag != null) ((InterruptibleIterator) this.iter).setInterruptFlag(iflag); return iter; }
((InterruptibleIterator) skvi).setInterruptFlag(interruptFlag);
@Override public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) { try { SortedKeyValueIterator<Key,Value> other = env.reserveMapFileReader(dirName); ((InterruptibleIterator) other).setInterruptFlag(interruptFlag); log.debug("deep copying MapFile: " + this + " -> " + other); return other; } catch (IOException e) { log.error("failed to clone map file reader", e); throw new RuntimeException(e); } }
void setIterator(SortedKeyValueIterator<Key,Value> iter) { current = false; this.iter = iter; if (iflag != null) { ((InterruptibleIterator) this.iter).setInterruptFlag(iflag); } for (FileDataSource fds : deepCopies) { fds.current = false; fds.iter = iter.deepCopy(fds.env); } }
@Override public void setInterruptFlag(AtomicBoolean flag) { synchronized (copies) { if (copies.size() != 1) throw new IllegalStateException( "setInterruptFlag() called after deep copies made " + copies.size()); if (iter != null) ((InterruptibleIterator) iter).setInterruptFlag(flag); source.setInterruptFlag(flag); } } }
@Override public void setInterruptFlag(AtomicBoolean flag) { this.interruptFlag = flag; for (LocalityGroup lgr : lgContext.groups) { lgr.getIterator().setInterruptFlag(flag); } }