public static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V> loadIterators( // @formatter:on IteratorScope scope, SortedKeyValueIterator<K,V> source, KeyExtent extent, AccumuloConfiguration conf, List<IterInfo> ssiList, Map<String,Map<String,String>> ssio, IteratorEnvironment env) throws IOException { return loadIterators(scope, source, extent, conf, ssiList, ssio, env, true); }
@Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { Range seekRange = IteratorUtil.maximizeStartKeyTimeStamp(range); seekRange = IteratorUtil.minimizeEndKeyTimeStamp(seekRange); source.seek(seekRange, columnFamilies, inclusive); this.range = range; while (hasTop() && range.beforeStartKey(getTopKey())) { next(); } }
/** * Retrieves the complete set of currently configured table properties to be applied to a table * when this configuration object is used. * * @return the current properties configured */ public Map<String,String> getProperties() { Map<String,String> propertyMap = new HashMap<>(); if (limitVersion) propertyMap.putAll(IteratorUtil.generateInitialTableProperties(limitVersion)); propertyMap.putAll(summarizerProps); propertyMap.putAll(samplerProps); propertyMap.putAll(properties); propertyMap.putAll(iteratorProps); propertyMap.putAll(localityProps); return Collections.unmodifiableMap(propertyMap); }
private static void parseIteratorConfiguration(IteratorScope scope, List<IterInfo> iters, Map<String,Map<String,String>> ssio, Map<String,Map<String,String>> allOptions, AccumuloConfiguration conf) { parseIterConf(scope, iters, allOptions, conf); mergeOptions(ssio, allOptions); }
private static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V> loadIteratorsHelper( // @formatter:on IteratorScope scope, SortedKeyValueIterator<K,V> source, AccumuloConfiguration conf, List<IterInfo> ssiList, Map<String,Map<String,String>> ssio, IteratorEnvironment env, boolean useAccumuloClassLoader, String classLoaderContext) throws IOException { List<IterInfo> iters = new ArrayList<>(ssiList); Map<String,Map<String,String>> allOptions = new HashMap<>(); parseIteratorConfiguration(scope, iters, ssio, allOptions, conf); return loadIterators(source, iters, allOptions, env, useAccumuloClassLoader, classLoaderContext); }
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); }
@Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { // do not want to seek to the middle of a row Range seekRange = IteratorUtil.maximizeStartKeyTimeStamp(range); this.range = seekRange; this.columnFamilies = columnFamilies; this.inclusive = inclusive; super.seek(seekRange, columnFamilies, inclusive); resetVersionCount(); if (range.getStartKey() != null) while (hasTop() && range.beforeStartKey(getTopKey())) next(); }
SortedSet<Column> cols = this.getFetchedColumns(); families = LocalityGroupUtil.families(cols); iterator = IteratorUtil.setupSystemScanIterators(iterator, cols, getAuthorizations(), EMPTY_BYTES, tableConf); iterator = IteratorUtil.loadIterators(IteratorScope.scan, iterator, null, tableConf, serverSideIteratorList, serverSideIteratorOptions, new IterEnv()); } else { iterator = IteratorUtil.loadIterators(iterator, serverSideIteratorList, serverSideIteratorOptions, new IterEnv(), false, null);
tablet.getScannedCounter()); SortedKeyValueIterator<Key,Value> visFilter = IteratorUtil.setupSystemScanIterators( statsIterator, options.getColumnSet(), options.getAuthorizations(), options.getDefaultLabels(), tablet.getTableConfiguration()); IteratorUtil.mergeIteratorConfig(iterInfos, iterOpts, pic.getIterInfo(), pic.getOpts(), options.getSsiList(), options.getSsio()); IteratorUtil.loadIterators(visFilter, iterInfos, iterOpts, iterEnv, true, context));
byte[] endRow = ByteBufferUtil.toBytes(arguments.get(2)); List<IteratorSetting> iterators = IteratorUtil .decodeIteratorSettings(ByteBufferUtil.toBytes(arguments.get(3))); CompactionStrategyConfig compactionStrategy = CompactionStrategyConfigUtil .decode(ByteBufferUtil.toBytes(arguments.get(4)));
public ParsedIteratorConfig getParsedIteratorConfig(IteratorScope scope) { long count = getUpdateCount(); AtomicReference<ParsedIteratorConfig> ref = iteratorConfig.get(scope); ParsedIteratorConfig pic = ref.get(); if (pic == null || pic.updateCount != count) { List<IterInfo> iters = new ArrayList<>(); Map<String,Map<String,String>> allOptions = new HashMap<>(); IteratorUtil.parseIterConf(scope, iters, allOptions, this); ParsedIteratorConfig newPic = new ParsedIteratorConfig(iters, allOptions, get(Property.TABLE_CLASSPATH), count); ref.compareAndSet(pic, newPic); pic = newPic; } return pic; }
@Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { // do not want to seek to the middle of a row Range seekRange = IteratorUtil.maximizeStartKeyTimeStamp(range); source.seek(seekRange, columnFamilies, inclusive); findTop(); if (range.getStartKey() != null) { while (source.hasTop() && source.getTopKey().compareTo(range.getStartKey(), PartialKey.ROW_COLFAM_COLQUAL_COLVIS_TIME) < 0) { next(); } while (hasTop() && range.beforeStartKey(getTopKey())) { next(); } } }
defaultSecurityLabel = cv.getExpression(); SortedKeyValueIterator<Key,Value> visFilter = IteratorUtil.setupSystemScanIterators(multiIter, new HashSet<>(options.fetchedColumns), authorizations, defaultSecurityLabel, acuTableConf); IteratorUtil.loadIterators(IteratorScope.scan, visFilter, extent, acuTableConf, options.serverSideIteratorList, options.serverSideIteratorOptions, iterEnv, false));
tablet.getScannedCounter()); SortedKeyValueIterator<Key,Value> visFilter = IteratorUtil.setupSystemScanIterators( statsIterator, options.getColumnSet(), options.getAuthorizations(), options.getDefaultLabels()); IteratorUtil.mergeIteratorConfig(iterInfos, iterOpts, pic.getIterInfo(), pic.getOpts(), options.getSsiList(), options.getSsio()); IteratorUtil.loadIterators(visFilter, iterInfos, iterOpts, iterEnv, true, context));
public static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V> loadIterators( // @formatter:on IteratorScope scope, SortedKeyValueIterator<K,V> source, KeyExtent extent, AccumuloConfiguration conf, List<IterInfo> ssiList, Map<String,Map<String,String>> ssio, IteratorEnvironment env, boolean useAccumuloClassLoader, String classLoaderContext) throws IOException { List<IterInfo> iters = new ArrayList<>(ssiList); Map<String,Map<String,String>> allOptions = new HashMap<>(); parseIteratorConfiguration(scope, iters, ssio, allOptions, conf); return loadIterators(source, iters, allOptions, env, useAccumuloClassLoader, classLoaderContext); }
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); }
private static void parseIteratorConfiguration(IteratorScope scope, List<IterInfo> iters, Map<String,Map<String,String>> ssio, Map<String,Map<String,String>> allOptions, AccumuloConfiguration conf) { parseIterConf(scope, iters, allOptions, conf); mergeOptions(ssio, allOptions); }
byte[] startRow = ByteBufferUtil.toBytes(arguments.get(1)); byte[] endRow = ByteBufferUtil.toBytes(arguments.get(2)); List<IteratorSetting> iterators = IteratorUtil.decodeIteratorSettings(ByteBufferUtil.toBytes(arguments.get(3)));