Search in sources :

Example 1 with IterConfig

use of org.apache.accumulo.core.clientImpl.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());
        IterConfigUtil.mergeIteratorConfig(mergedIters, mergedItersOpts, tableIters, tableIterOpts, ic.ssiList, ic.ssio);
        mic = new MergedIterConfig(mergedIters, mergedItersOpts);
        mergedIterCache.put(key, mic);
    }
    IterLoad iterLoad = new IterLoad().iters(mic.mergedIters).iterOpts(mic.mergedItersOpts).iterEnv(tie).useAccumuloClassLoader(true).context(context).classCache(classCache);
    return IterConfigUtil.loadIterators(systemIter, iterLoad);
}
Also used : IterLoad(org.apache.accumulo.core.conf.IterLoad) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) ArrayByteSequence(org.apache.accumulo.core.data.ArrayByteSequence) IterInfo(org.apache.accumulo.core.dataImpl.thrift.IterInfo) HashMap(java.util.HashMap) Map(java.util.Map) IterConfig(org.apache.accumulo.core.clientImpl.CompressedIterators.IterConfig)

Aggregations

ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 IterConfig (org.apache.accumulo.core.clientImpl.CompressedIterators.IterConfig)1 IterLoad (org.apache.accumulo.core.conf.IterLoad)1 ArrayByteSequence (org.apache.accumulo.core.data.ArrayByteSequence)1 IterInfo (org.apache.accumulo.core.dataImpl.thrift.IterInfo)1