Search in sources :

Example 1 with IterConfig

use of org.apache.accumulo.core.client.impl.CompressedIterators.IterConfig in project accumulo by apache.

the class ConditionCheckerContext method buildIterator.

SortedKeyValueIterator<Key, Value> buildIterator(SortedKeyValueIterator<Key, Value> systemIter, TCondition tc) throws IOException {
    ArrayByteSequence key = new ArrayByteSequence(tc.iterators);
    MergedIterConfig mic = mergedIterCache.get(key);
    if (mic == null) {
        IterConfig ic = compressedIters.decompress(tc.iterators);
        List<IterInfo> mergedIters = new ArrayList<>(tableIters.size() + ic.ssiList.size());
        Map<String, Map<String, String>> mergedItersOpts = new HashMap<>(tableIterOpts.size() + ic.ssio.size());
        IteratorUtil.mergeIteratorConfig(mergedIters, mergedItersOpts, tableIters, tableIterOpts, ic.ssiList, ic.ssio);
        mic = new MergedIterConfig(mergedIters, mergedItersOpts);
        mergedIterCache.put(key, mic);
    }
    return IteratorUtil.loadIterators(systemIter, mic.mergedIters, mic.mergedItersOpts, tie, true, context, classCache);
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) ArrayByteSequence(org.apache.accumulo.core.data.ArrayByteSequence) IterInfo(org.apache.accumulo.core.data.thrift.IterInfo) HashMap(java.util.HashMap) Map(java.util.Map) IterConfig(org.apache.accumulo.core.client.impl.CompressedIterators.IterConfig)

Aggregations

ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 IterConfig (org.apache.accumulo.core.client.impl.CompressedIterators.IterConfig)1 ArrayByteSequence (org.apache.accumulo.core.data.ArrayByteSequence)1 IterInfo (org.apache.accumulo.core.data.thrift.IterInfo)1