use of org.apache.accumulo.core.conf.IterLoad in project accumulo by apache.
the class CollectTabletStats method createScanIterator.
private static SortedKeyValueIterator<Key, Value> createScanIterator(KeyExtent ke, Collection<SortedKeyValueIterator<Key, Value>> mapfiles, Authorizations authorizations, byte[] defaultLabels, HashSet<Column> columnSet, List<IterInfo> ssiList, Map<String, Map<String, String>> ssio, boolean useTableIterators, TableConfiguration conf) throws IOException {
SortedMapIterator smi = new SortedMapIterator(new TreeMap<>());
List<SortedKeyValueIterator<Key, Value>> iters = new ArrayList<>(mapfiles.size() + 1);
iters.addAll(mapfiles);
iters.add(smi);
MultiIterator multiIter = new MultiIterator(iters, ke);
SortedKeyValueIterator<Key, Value> delIter = DeletingIterator.wrap(multiIter, false, Behavior.PROCESS);
ColumnFamilySkippingIterator cfsi = new ColumnFamilySkippingIterator(delIter);
SortedKeyValueIterator<Key, Value> colFilter = ColumnQualifierFilter.wrap(cfsi, columnSet);
SortedKeyValueIterator<Key, Value> visFilter = VisibilityFilter.wrap(colFilter, authorizations, defaultLabels);
if (useTableIterators) {
IterLoad il = IterConfigUtil.loadIterConf(IteratorScope.scan, ssiList, ssio, conf);
return IterConfigUtil.loadIterators(visFilter, il.useAccumuloClassLoader(true));
}
return visFilter;
}
Aggregations