@Test public void testNoRangeScan() throws Exception { List<Class<? extends ReversingKeyTransformingIterator>> classes = new ArrayList<>(); classes.add(ColFamReversingKeyTransformingIterator.class); classes.add(ColQualReversingKeyTransformingIterator.class); classes.add(ColVisReversingKeyTransformingIterator.class); for (Class<? extends ReversingKeyTransformingIterator> clazz : classes) { setUpTransformIterator(clazz); TransformingIterator iter = clazz.getDeclaredConstructor().newInstance(); TreeMap<Key,Value> expected = new TreeMap<>(); for (int row = 1; row <= 3; ++row) { for (int cf = 1; cf <= 3; ++cf) { for (int cq = 1; cq <= 3; ++cq) { for (int cv = 1; cv <= 3; ++cv) { putExpected(expected, row, cf, cq, cv, iter.getKeyPrefix()); } } } } checkExpected(expected); } }
protected abstract PartialKey getKeyPrefix();
TransformingIterator extends WrappingIterator implements OptionDescriber { protected abstract PartialKey getKeyPrefix(); }
TransformingIterator extends WrappingIterator implements OptionDescriber { protected abstract PartialKey getKeyPrefix();  }
TransformingIterator extends WrappingIterator implements OptionDescriber { protected abstract PartialKey getKeyPrefix();  @Override void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options,
      IteratorEnvironment env); @Override IteratorOptions describeOptions(); @Override boolean validateOptions(Map<String,String> options); @Override SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env); @Override boolean hasTop(); @Override Key getTopKey(); @Override Value getTopValue(); @Override void next(); @Override void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive); static void setAuthorizations(IteratorSetting config, Authorizations auths); static void setMaxBufferSize(IteratorSetting config, long maxBufferSize); }
TransformingIterator extends WrappingIterator implements OptionDescriber { protected abstract PartialKey getKeyPrefix();  @Override void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options,
      IteratorEnvironment env); @Override IteratorOptions describeOptions(); @Override boolean validateOptions(Map<String,String> options); @Override SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env); @Override boolean hasTop(); @Override Key getTopKey(); @Override Value getTopValue(); @Override void next(); @Override void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive); static void setAuthorizations(IteratorSetting config, Authorizations auths); static void setMaxBufferSize(IteratorSetting config, long maxBufferSize); static final String AUTH_OPT; static final String MAX_BUFFER_SIZE_OPT; }