@Test public void testApply_Payload_NotApplicableIndex() { RecordEvent recordEvent = new RecordEvent(); IndexRecordFilterData filterData = new IndexRecordFilterData(); filterData.setSubscriptionInclusions(ImmutableSet.of("SomeOtherIndexName")); recordEvent.setIndexRecordFilterData(filterData); WALEdit walEdit = new WALEdit(); walEdit.add(new KeyValue(Bytes.toBytes("row"), RecordCf.DATA.bytes, RecordColumn.PAYLOAD.bytes, recordEvent.toJsonBytes())); editFilter.apply(walEdit); assertEquals(0, walEdit.size()); }
@Override public void apply(WALEdit walEdit) { List<KeyValue> keyValues = walEdit.getKeyValues(); for (int i = keyValues.size() - 1; i >= 0; i--) { if (!isValidKeyValue(keyValues.get(i))) { keyValues.remove(i); } } }
IndexerEditFilter implements WALEditFilter { @Override public void apply(WALEdit walEdit) { List<KeyValue> keyValues = walEdit.getKeyValues(); for (int i = keyValues.size() - 1; i >= 0; i--) { if (!isValidKeyValue(keyValues.get(i))) { keyValues.remove(i); } } } }
IndexerEditFilter implements WALEditFilter { @Override public void apply(WALEdit walEdit) { List<KeyValue> keyValues = walEdit.getKeyValues(); for (int i = keyValues.size() - 1; i >= 0; i--) { if (!isValidKeyValue(keyValues.get(i))) { keyValues.remove(i); } } } IndexerEditFilter(String subscriptionName); }
IndexerEditFilter implements WALEditFilter { @Override public void apply(WALEdit walEdit) { List<KeyValue> keyValues = walEdit.getKeyValues(); for (int i = keyValues.size() - 1; i >= 0; i--) { if (!isValidKeyValue(keyValues.get(i))) { keyValues.remove(i); } } } IndexerEditFilter(String subscriptionName); @Override void apply(WALEdit walEdit); String getSubscriptionName(); }
IndexerEditFilter implements WALEditFilter { @Override public void apply(WALEdit walEdit) { List<KeyValue> keyValues = walEdit.getKeyValues(); for (int i = keyValues.size() - 1; i >= 0; i--) { if (!isValidKeyValue(keyValues.get(i))) { keyValues.remove(i); } } } IndexerEditFilter(String subscriptionName); @Override void apply(WALEdit walEdit); String getSubscriptionName(); static final String NO_INDEX_FLAG; }