@Test(expected = SampleNotPresentException.class) public void testSampleNotPresent() { SortedMapIterator smi = new SortedMapIterator(new TreeMap<>()); smi.deepCopy(new IteratorEnvironment() { @Override public boolean isSamplingEnabled() { return true; } @Override public SamplerConfiguration getSamplerConfiguration() { return new SamplerConfiguration(RowSampler.class.getName()); } }); }
@Override public SortedMapIterator deepCopy(IteratorEnvironment env) { if (env != null && env.isSamplingEnabled()) { throw new SampleNotPresentException(); } return new SortedMapIterator(map); }
SortedMapIterator implements SortedKeyValueIterator<Key,Value> { @Override public SortedMapIterator deepCopy(IteratorEnvironment env) { if (env != null && env.isSamplingEnabled()) { throw new SampleNotPresentException(); } return new SortedMapIterator(map); } }
SortedMapIterator implements SortedKeyValueIterator<Key,Value> { @Override public SortedMapIterator deepCopy(IteratorEnvironment env) { if (env != null && env.isSamplingEnabled()) { throw new SampleNotPresentException(); } return new SortedMapIterator(map); } SortedMapIterator(SortedMap<Key,Value> map); }
SortedMapIterator implements SortedKeyValueIterator<Key,Value> { @Override public SortedMapIterator deepCopy(IteratorEnvironment env) { if (env != null && env.isSamplingEnabled()) { throw new SampleNotPresentException(); } return new SortedMapIterator(map); } SortedMapIterator(SortedMap<Key,Value> map); @Override SortedMapIterator deepCopy(IteratorEnvironment env); @Override Key getTopKey(); @Override Value getTopValue(); @Override boolean hasTop(); @Override void next(); @Override void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive); @Override void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options,
      IteratorEnvironment env); }
SortedMapIterator implements SortedKeyValueIterator<Key,Value> { @Override public SortedMapIterator deepCopy(IteratorEnvironment env) { if (env != null && env.isSamplingEnabled()) { throw new SampleNotPresentException(); } return new SortedMapIterator(map); } SortedMapIterator(SortedMap<Key,Value> map); @Override SortedMapIterator deepCopy(IteratorEnvironment env); @Override Key getTopKey(); @Override Value getTopValue(); @Override boolean hasTop(); @Override void next(); @Override void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive); @Override void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options,
      IteratorEnvironment env);  }