@Test public void testApply_NonJsonPayload() { WALEdit walEdit = new WALEdit(); walEdit.add(new KeyValue(Bytes.toBytes("row"), RecordCf.DATA.bytes, RecordColumn.PAYLOAD.bytes, Bytes.toBytes("non-json payload"))); 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; }