Search in sources :

Example 6 with IterLoad

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;
}
Also used : ColumnFamilySkippingIterator(org.apache.accumulo.core.iteratorsImpl.system.ColumnFamilySkippingIterator) IterLoad(org.apache.accumulo.core.conf.IterLoad) MultiIterator(org.apache.accumulo.core.iteratorsImpl.system.MultiIterator) ArrayList(java.util.ArrayList) Value(org.apache.accumulo.core.data.Value) SortedKeyValueIterator(org.apache.accumulo.core.iterators.SortedKeyValueIterator) SortedMapIterator(org.apache.accumulo.core.iteratorsImpl.system.SortedMapIterator) Key(org.apache.accumulo.core.data.Key)

Aggregations

IterLoad (org.apache.accumulo.core.conf.IterLoad)6 Key (org.apache.accumulo.core.data.Key)5 Value (org.apache.accumulo.core.data.Value)5 ArrayList (java.util.ArrayList)4 MultiIterator (org.apache.accumulo.core.iteratorsImpl.system.MultiIterator)4 IterInfo (org.apache.accumulo.core.dataImpl.thrift.IterInfo)3 SortedKeyValueIterator (org.apache.accumulo.core.iterators.SortedKeyValueIterator)3 SamplerConfigurationImpl (org.apache.accumulo.core.sample.impl.SamplerConfigurationImpl)3 IOException (java.io.IOException)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 ArrayByteSequence (org.apache.accumulo.core.data.ArrayByteSequence)2 ByteSequence (org.apache.accumulo.core.data.ByteSequence)2 Column (org.apache.accumulo.core.data.Column)2 IteratorAdapter (org.apache.accumulo.core.iterators.IteratorAdapter)2 TabletFile (org.apache.accumulo.core.metadata.TabletFile)2 TreeMap (java.util.TreeMap)1 TreeSet (java.util.TreeSet)1 SampleNotPresentException (org.apache.accumulo.core.client.SampleNotPresentException)1 SamplerConfiguration (org.apache.accumulo.core.client.sample.SamplerConfiguration)1