@Test public void testAllowValidLabelsOnly() throws IOException { IteratorSetting is = new IteratorSetting(1, VisibilityFilter.class); VisibilityFilter.filterInvalidLabelsOnly(is, true); TreeMap<Key,Value> source = createPollutedSource(1, 2); verify(source, 3, is.getOptions(), GOOD, GOOD, GOOD_VIS, 1); source = createPollutedSource(30, 500); verify(source, 530, is.getOptions(), GOOD, GOOD, GOOD_VIS, 30); source = createPollutedSource(1000, 500); verify(source, 1500, is.getOptions(), GOOD, GOOD, GOOD_VIS, 1000); }
public static void filterInvalidLabelsOnly(IteratorSetting setting, boolean featureEnabled) { setting.addOption(FILTER_INVALID_ONLY, Boolean.toString(featureEnabled)); }
VisibilityFilter extends Filter implements OptionDescriber { public static void filterInvalidLabelsOnly(IteratorSetting setting, boolean featureEnabled) { setting.addOption(FILTER_INVALID_ONLY, Boolean.toString(featureEnabled)); } }
VisibilityFilter extends Filter implements OptionDescriber { public static void filterInvalidLabelsOnly(IteratorSetting setting, boolean featureEnabled) { setting.addOption(FILTER_INVALID_ONLY, Boolean.toString(featureEnabled)); }  }
VisibilityFilter extends Filter implements OptionDescriber { public static void filterInvalidLabelsOnly(IteratorSetting setting, boolean featureEnabled) { setting.addOption(FILTER_INVALID_ONLY, Boolean.toString(featureEnabled)); }  @Override void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options,
      IteratorEnvironment env); @Override boolean accept(Key k, Value v); @Override IteratorOptions describeOptions(); static void setAuthorizations(IteratorSetting setting, Authorizations auths); static void filterInvalidLabelsOnly(IteratorSetting setting, boolean featureEnabled); }
VisibilityFilter extends Filter implements OptionDescriber { public static void filterInvalidLabelsOnly(IteratorSetting setting, boolean featureEnabled) { setting.addOption(FILTER_INVALID_ONLY, Boolean.toString(featureEnabled)); }  @Override void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options,
      IteratorEnvironment env); @Override boolean accept(Key k, Value v); @Override IteratorOptions describeOptions(); static void setAuthorizations(IteratorSetting setting, Authorizations auths); static void filterInvalidLabelsOnly(IteratorSetting setting, boolean featureEnabled);  }