/** * For FilterList, we can consider a filter list as a node in a tree. sub-filters of the filter * list are children of the relative node. The logic of transforming cell of a filter list, well, * we can consider it as the process of post-order tree traverse. For a node , before we traverse * the current child, we should set the traverse result (transformed cell) of previous node(s) as * the initial value. (HBASE-18879). * @param c The cell in question. * @return the transformed cell. * @throws IOException */ @Override public Cell transformCell(Cell c) throws IOException { if (isEmpty()) { return super.transformCell(c); } Cell transformed = c; for (int i = 0, n = filters.size(); i < n; i++) { if (subFiltersIncludedCell.get(i)) { transformed = filters.get(i).transformCell(transformed); } } return transformed; }
/** * For FilterList, we can consider a filter list as a node in a tree. sub-filters of the filter * list are children of the relative node. The logic of transforming cell of a filter list, well, * we can consider it as the process of post-order tree traverse. For a node , before we traverse * the current child, we should set the traverse result (transformed cell) of previous node(s) as * the initial value. (HBASE-18879). * @param c The cell in question. * @return the transformed cell. * @throws IOException */ @Override public Cell transformCell(Cell c) throws IOException { if (isEmpty()) { return super.transformCell(c); } Cell transformed = c; for (int i = 0, n = filters.size(); i < n; i++) { if (subFiltersIncludedCell.get(i)) { transformed = filters.get(i).transformCell(transformed); } } return transformed; }
/** * For FilterList, we can consider a filter list as a node in a tree. sub-filters of the filter * list are children of the relative node. The logic of transforming cell of a filter list, well, * we can consider it as the process of post-order tree traverse. For a node , before we traverse * the current child, we should set the traverse result (transformed cell) of previous node(s) as * the initial value. (HBASE-18879). * @param c The cell in question. * @return the transformed cell. * @throws IOException */ @Override public Cell transformCell(Cell c) throws IOException { if (isEmpty()) { return super.transformCell(c); } Cell transformed = c; for (int i = 0, n = filters.size(); i < n; i++) { if (subFiltersIncludedCell.get(i)) { transformed = filters.get(i).transformCell(transformed); } } return transformed; }