@Override public boolean hasNext() { if (!iter.hasNext()) { next = null; return false; } File nextFile = iter.next(); try { MCollection result = new CollectionSingleIndexFile(new MFileOS7(nextFile.getPath()), logger); if (wasRemoved(result)) return hasNext(); result.putAuxInfo(FeatureCollectionConfig.AUX_CONFIG, config); next = result; return true; } catch (IOException e) { logger.error("PartitionManagerFromList failed on " + nextFile.getPath(), e); throw new RuntimeException(e); } }
private boolean wasRemoved(MCollection partition) { return removed != null && (removed.contains(partition.getCollectionName())); }
public void removePartition(MCollection partition) { if (removed == null) removed = new ArrayList<>(); removed.add(partition.getCollectionName()); }