@Override public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { super.init(source, options, env); String o = options.get(NUM_SCANS_STRING_NAME); numscans = o == null ? 10 : Integer.parseInt(o); }
@Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { super.seek(range, columnFamilies, inclusive); consume(); }
@Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { this.range = range; this.columnFamilies = columnFamilies; this.inclusive = inclusive; super.seek(range, columnFamilies, inclusive); }
@Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { this.prevRange = range; this.columnFamilies = columnFamilies; this.colfInclusive = inclusive; super.seek(range, columnFamilies, inclusive); }
@Override public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { super.init(source, options, env); current = parseServers(options.get(SERVERS_OPTION)); onlineTables = parseTableIDs(options.get(TABLES_OPTION)); merges = parseMerges(options.get(MERGES_OPTION)); debug = options.containsKey(DEBUG_OPTION); migrations = parseMigrations(options.get(MIGRATIONS_OPTION)); try { masterState = MasterState.valueOf(options.get(MASTER_STATE_OPTION)); } catch (Exception ex) { if (options.get(MASTER_STATE_OPTION) != null) { log.error("Unable to decode masterState {}", options.get(MASTER_STATE_OPTION)); } } Set<TServerInstance> shuttingDown = parseServers(options.get(SHUTTING_DOWN_OPTION)); if (current != null && shuttingDown != null) { current.removeAll(shuttingDown); } }
@Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { if (columnFamilies instanceof Set<?>) { colFamSet = (Set<ByteSequence>) columnFamilies; } else { colFamSet = new HashSet<>(); colFamSet.addAll(columnFamilies); } if (inclusive) { sortedColFams = new TreeSet<>(colFamSet); } else { sortedColFams = null; } this.range = range; this.inclusive = inclusive; super.seek(range, colFamSet, inclusive); }
@Override public void next() throws IOException { super.next(); consume(); }
@Override public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { super.init(source, options, env); String o = options.get(NUM_SCANS_STRING_NAME); numscans = o == null ? 10 : Integer.parseInt(o); }
@Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { // save parameters for future internal seeks latestRange = range; latestColumnFamilies = columnFamilies; latestInclusive = inclusive; lastRowFound = null; Key startKey = range.getStartKey(); Range seekRange = new Range(startKey == null ? null : new Key(startKey.getRow()), true, range.getEndKey(), range.isEndKeyInclusive()); super.seek(seekRange, columnFamilies, inclusive); finished = false; if (getSource().hasTop()) { lastRowFound = getSource().getTopKey().getRow(); if (range.beforeStartKey(getSource().getTopKey())) consume(); } }
@Override public void next() throws IOException { super.next(); consume(); }
@Override public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { super.init(source, options, env); this.mod = Integer.parseInt(options.get("mod")); this.drop = Integer.parseInt(options.get("drop")); }
@Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { lastKeySet = false; seekRange = IteratorUtil.maximizeStartKeyTimeStamp(range); this.colFams = new HashSet<>(columnFamilies); this.inclusive = inclusive; super.seek(seekRange, columnFamilies, inclusive); while (hasTop() && range.beforeStartKey(getTopKey())) { next(); } }
@Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { super.seek(range, columnFamilies, inclusive); consume(); }
@Override public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { super.init(source, options, env); String o = options.get(NUM_SCANS_STRING_NAME); numscans = o == null ? 10 : Integer.parseInt(o); delimiter = options.get(ROW_DELIMITER_OPTION); if (null != delimiter) { comparator = new RowPrefixComparator(delimiter); } }
@Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { lastKeySet = false; Range seekRange = IteratorUtil.maximizeStartKeyTimeStamp(range); super.seek(seekRange, columnFamilies, inclusive); while (hasTop() && range.beforeStartKey(getTopKey())) { next(); } }
@Override public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { validateOptions(options); super.init(source, options, env); }
@Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { // save parameters for future internal seeks latestRange = range; latestColumnFamilies = columnFamilies; latestInclusive = inclusive; lastKeyFound = null; Key startKey = range.getStartKey(); Range seekRange = new Range(startKey == null ? null : new Key(startKey.getRow()), true, range.getEndKey(), range.isEndKeyInclusive()); super.seek(seekRange, columnFamilies, inclusive); finished = false; if (getSource().hasTop()) { lastKeyFound = getSource().getTopKey(); if (range.beforeStartKey(getSource().getTopKey())) consume(); } }
@Override public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { super.init(source, options, env); String e = options.get(RANGE_NAME); if (e == null) throw new IOException("COLUMN_FAMILY_RANGE_NAME must be set"); columnRange = decodeRange(e); String num = options.get(SKIP_LIMIT_NAME); if (num != null) { skipLimit = Integer.parseInt(num); } else { skipLimit = 10; } }
@Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { // save parameters for future internal seeks latestRange = range; latestColumnFamilies = columnFamilies; latestInclusive = inclusive; lastRowFound = null; Key startKey = range.getStartKey(); Range seekRange = new Range(startKey == null ? null : new Key(startKey.getRow()), true, range.getEndKey(), range.isEndKeyInclusive()); super.seek(seekRange, columnFamilies, inclusive); finished = false; if (getSource().hasTop()) { lastRowFound = getSource().getTopKey().getRow(); if (range.beforeStartKey(getSource().getTopKey())) consume(); } }
@Override public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { super.init(source, options, env); current = parseServers(options.get(SERVERS_OPTION)); onlineTables = parseTables(options.get(TABLES_OPTION)); merges = parseMerges(options.get(MERGES_OPTION)); migrations = parseMigrations(options.get(MIGRATIONS_OPTION)); }