/** * Filters that never filter by modifying the returned List of Cells can inherit this * implementation that does nothing. {@inheritDoc} */ @Override public void filterRowCells(List<Cell> cells) throws IOException { for (int i = 0, n = filters.size(); i < n; i++) { filters.get(i).filterRowCells(cells); } }
public FilterRowRetCode filterRowCellsWithRet(List<Cell> kvs) throws IOException { //To fix HBASE-6429, //Filter with filterRow() returning true is incompatible with scan with limit //1. hasFilterRow() returns true, if either filterRow() or filterRow(kvs) is implemented. //2. filterRow() is merged with filterRow(kvs), //so that to make all those row related filtering stuff in the same function. this.filter.filterRowCells(kvs); if (!kvs.isEmpty()) { if (this.filter.filterRow()) { kvs.clear(); return FilterRowRetCode.EXCLUDE; } return FilterRowRetCode.INCLUDE; } return FilterRowRetCode.NOT_CALLED; }
/** * Test that the filter correctly drops rows without a corresponding timestamp * * @throws Exception */ @Test public void testFilterDropping() throws Exception { Filter filter = new DependentColumnFilter(FAMILIES[0], QUALIFIER); List<Cell> accepted = new ArrayList<>(); for(Cell val : testVals) { if(filter.filterCell(val) == ReturnCode.INCLUDE) { accepted.add(val); } } assertEquals("check all values accepted from filterCell", 5, accepted.size()); filter.filterRowCells(accepted); assertEquals("check filterRow(List<KeyValue>) dropped cell without corresponding column entry", 4, accepted.size()); // start do it again with dependent column dropping on filter = new DependentColumnFilter(FAMILIES[1], QUALIFIER, true); accepted.clear(); for(KeyValue val : testVals) { if(filter.filterCell(val) == ReturnCode.INCLUDE) { accepted.add(val); } } assertEquals("check the filtering column cells got dropped", 2, accepted.size()); filter.filterRowCells(accepted); assertEquals("check cell retention", 2, accepted.size()); }
/** * Filters that never filter by modifying the returned List of Cells can inherit this * implementation that does nothing. {@inheritDoc} */ @Override public void filterRowCells(List<Cell> cells) throws IOException { for (int i = 0, n = filters.size(); i < n; i++) { filters.get(i).filterRowCells(cells); } }
kvs.add (new KeyValue(ROW, COLUMN_FAMILY, COLUMN_QUALIFIER_2, VAL_1)); filter.filterRowCells(kvs);
@Override public void filterRowCells(List<Cell> kvs) throws IOException { filter.filterRowCells(kvs); }
/** * Filters that never filter by modifying the returned List of Cells can inherit this * implementation that does nothing. {@inheritDoc} */ @Override public void filterRowCells(List<Cell> cells) throws IOException { for (int i = 0, n = filters.size(); i < n; i++) { filters.get(i).filterRowCells(cells); } }
@Override public void filterRowCells(List<Cell> kvs) throws IOException { if (cellFilter != null) { cellFilter.filterRowCells(kvs); } else { super.filterRowCells(kvs); } }
@Override public void filterRowCells(List<Cell> kvs) throws IOException { if (cellFilter != null) { cellFilter.filterRowCells(kvs); } else { super.filterRowCells(kvs); } }
@Override public void filterRowCells(List<Cell> kvs) throws IOException { if (cellFilter != null) { cellFilter.filterRowCells(kvs); } else { super.filterRowCells(kvs); } }
@Override public void filterRowCells(List<Cell> kvs) throws IOException { if (cellFilter != null) { cellFilter.filterRowCells(kvs); } else { super.filterRowCells(kvs); } }
@Override public void filterRowCells(List<Cell> kvs) throws IOException { if (cellFilter != null) { cellFilter.filterRowCells(kvs); } else { super.filterRowCells(kvs); } }
@Override public void filterRowCells(List<Cell> kvs) throws IOException { if (cellFilter != null) { cellFilter.filterRowCells(kvs); } else { super.filterRowCells(kvs); } }
@Override public void filterRowCells(List<Cell> kvs) throws IOException { if (cellFilter != null) { cellFilter.filterRowCells(kvs); } else { super.filterRowCells(kvs); } }
@Override public void filterRowCells(List<Cell> kvs) throws IOException { if (cellFilter != null) { cellFilter.filterRowCells(kvs); } else { super.filterRowCells(kvs); } }
@Override public void filterRowCells(List<Cell> kvs) throws IOException { if (cellFilter != null) { cellFilter.filterRowCells(kvs); } else { super.filterRowCells(kvs); } }
@Override public void filterRowCells(List<Cell> kvs) throws IOException { if (cellFilter != null) { cellFilter.filterRowCells(kvs); } else { super.filterRowCells(kvs); } }
@Override public void filterRowCells(List<Cell> kvs) throws IOException { if (cellFilter != null) { cellFilter.filterRowCells(kvs); } else { super.filterRowCells(kvs); } }
@Override public void filterRowCells(List<Cell> kvs) throws IOException { if (cellFilter != null) { cellFilter.filterRowCells(kvs); } else { super.filterRowCells(kvs); } }
@Override public void filterRowCells(List<Cell> kvs) throws IOException { if (cellFilter != null) { cellFilter.filterRowCells(kvs); } else { super.filterRowCells(kvs); } }