@Override public void insertNewFiles(Collection<HStoreFile> sfs) throws IOException { this.storefiles = ImmutableList.sortedCopyOf(storeFileComparator, Iterables.concat(this.storefiles, sfs)); }
@Override public void addCompactionResults(Collection<HStoreFile> newCompactedfiles, Collection<HStoreFile> results) { this.storefiles = ImmutableList.sortedCopyOf(storeFileComparator, Iterables .concat(Iterables.filter(storefiles, sf -> !newCompactedfiles.contains(sf)), results)); // Mark the files as compactedAway once the storefiles and compactedfiles list is finalized // Let a background thread close the actual reader on these compacted files and also // ensure to evict the blocks from block cache so that they are no longer in // cache newCompactedfiles.forEach(HStoreFile::markCompactedAway); this.compactedfiles = ImmutableList.sortedCopyOf(storeFileComparator, Iterables.concat(this.compactedfiles, newCompactedfiles)); }
final double percentRegionsReportedThreshold = getRegionReportPercent(getConfiguration()); Set<TableName> tablesToRemove = new HashSet<>(); for (TableName table : Iterables.concat(tablesWithTableQuotas, tablesWithNamespaceQuotas)) {
Iterable<FileStatus> filesToDelete = Iterables.concat(invalidFiles, deletableValidFiles); return deleteFiles(filesToDelete) == files.size();
for (AllocRecord rec : Iterables.concat(allocations)) { sizeCounted += rec.size; if (rec.size == 0) continue;
@Override public UnmodifiableIterator<E> iterator() { Iterable<E> incidentEdges = (selfLoopCount == 0) ? Iterables.concat(inEdgeMap.keySet(), outEdgeMap.keySet()) : Sets.union(inEdgeMap.keySet(), outEdgeMap.keySet()); return Iterators.unmodifiableIterator(incidentEdges.iterator()); }
/** * Combines multiple iterables into a single iterable. The returned iterable has an iterator that * traverses the elements of each iterable in {@code inputs}. The input iterators are not polled * until necessary. * * <p>The returned iterable's iterator supports {@code remove()} when the corresponding input * iterator supports it. * * <p><b>Java 8 users:</b> The {@code Stream} equivalent of this method is {@code * Streams.concat(...)}. * * @throws NullPointerException if any of the provided iterables is null */ @SafeVarargs public static <T> Iterable<T> concat(Iterable<? extends T>... inputs) { return concat(ImmutableList.copyOf(inputs)); }
/** * Returns a new range set consisting of the union of this range set and {@code other}. * * <p>This is essentially the same as {@code TreeRangeSet.create(this).addAll(other)} except it * returns an {@code ImmutableRangeSet}. * * @since 21.0 */ public ImmutableRangeSet<C> union(RangeSet<C> other) { return unionOf(Iterables.concat(asRanges(), other.asRanges())); }
for (AllocRecord rec : Iterables.concat(allocations)) { sizeCounted += rec.size; if (rec.size == 0) continue;