HBASE-11016 Remove Filter#filterRow(List)
This commit is contained in:
parent
4053868e72
commit
c45ffa4986
|
@ -187,18 +187,11 @@ public abstract class Filter {
|
|||
*/
|
||||
abstract public void filterRowCells(List<Cell> kvs) throws IOException;
|
||||
|
||||
/**
|
||||
* WARNING: please to not override this method. Instead override {@link #filterRowCells(List)}.
|
||||
* This is for transition from 0.94 -> 0.96
|
||||
**/
|
||||
@Deprecated
|
||||
abstract public void filterRow(List<KeyValue> kvs) throws IOException;
|
||||
|
||||
/**
|
||||
* Primarily used to check for conflicts with scans(such as scans that do not read a full row at a
|
||||
* time).
|
||||
*
|
||||
* @return True if this filter actively uses filterRow(List) or filterRow().
|
||||
* @return True if this filter actively uses filterRowCells(List) or filterRow().
|
||||
*/
|
||||
abstract public boolean hasFilterRow();
|
||||
|
||||
|
|
|
@ -103,25 +103,6 @@ public abstract class FilterBase extends Filter {
|
|||
*/
|
||||
@Override
|
||||
public void filterRowCells(List<Cell> ignored) throws IOException {
|
||||
// Old filters based off of this class will override KeyValue transform(KeyValue).
|
||||
// Thus to maintain compatibility we need to call the old version.
|
||||
List<KeyValue> kvs = new ArrayList<KeyValue>(ignored.size());
|
||||
for (Cell c : ignored) {
|
||||
kvs.add(KeyValueUtil.ensureKeyValue(c));
|
||||
}
|
||||
filterRow(kvs);
|
||||
ignored.clear();
|
||||
ignored.addAll(kvs);
|
||||
}
|
||||
|
||||
/**
|
||||
* WARNING: please to not override this method. Instead override {@link #transformCell(Cell)}.
|
||||
*
|
||||
* This is for transition from 0.94 -> 0.96
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public void filterRow(List<KeyValue> kvs) throws IOException {
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -308,43 +308,12 @@ final public class FilterList extends Filter {
|
|||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void filterRowCells(List<Cell> ignored) throws IOException {
|
||||
// Old filters based off of this class will override KeyValue transform(KeyValue).
|
||||
// Thus to maintain compatibility we need to call the old version.
|
||||
List<KeyValue> kvs = new ArrayList<KeyValue>(ignored.size());
|
||||
for (Cell c : ignored) {
|
||||
kvs.add(KeyValueUtil.ensureKeyValue(c));
|
||||
}
|
||||
filterRow(kvs);
|
||||
ignored.clear();
|
||||
ignored.addAll(kvs);
|
||||
}
|
||||
|
||||
/**
|
||||
* WARNING: please to not override this method. Instead override {@link #transformCell(Cell)}.
|
||||
*
|
||||
* This is for transition from 0.94 -> 0.96
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public void filterRow(List<KeyValue> kvs) throws IOException {
|
||||
// when removing this, this body should be in filterRowCells
|
||||
|
||||
// convert to List<Cell> and call the new interface (this will call 0.96-style
|
||||
// #filterRowCells(List<Cell>) which may delegate to legacy #filterRow(List<KV>)
|
||||
List<Cell> cells = new ArrayList<Cell>(kvs.size());
|
||||
cells.addAll(kvs);
|
||||
public void filterRowCells(List<Cell> cells) throws IOException {
|
||||
for (Filter filter : filters) {
|
||||
filter.filterRowCells(cells);
|
||||
}
|
||||
|
||||
// convert results into kvs
|
||||
kvs.clear();
|
||||
for (Cell c : cells) {
|
||||
kvs.add(KeyValueUtil.ensureKeyValue(c));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean hasFilterRow() {
|
||||
for (Filter filter : filters) {
|
||||
|
|
|
@ -178,19 +178,6 @@ final public class FilterWrapper extends Filter {
|
|||
return FilterRowRetCode.NOT_CALLED;
|
||||
}
|
||||
|
||||
/**
|
||||
* WARNING: please to not override this method. Instead override {@link #transformCell(Cell)}.
|
||||
*
|
||||
* This is for transition from 0.94 -> 0.96
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public void filterRow(List<KeyValue> kvs) throws IOException {
|
||||
// This is only used internally, marked InterfaceAudience.private, and not used anywhere.
|
||||
// We can get away with not implementing this.
|
||||
throw new UnsupportedOperationException("filterRow(List<KeyValue>) should never be called");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFamilyEssential(byte[] name) throws IOException {
|
||||
return filter.isFamilyEssential(name);
|
||||
|
|
Loading…
Reference in New Issue