Repository: hbase Updated Branches: refs/heads/master 4053868e7 -> c45ffa498
HBASE-11016 Remove Filter#filterRow(List) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c45ffa49 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c45ffa49 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c45ffa49 Branch: refs/heads/master Commit: c45ffa4986b387da73633eabbff4f1026a50161e Parents: 4053868 Author: tedyu <[email protected]> Authored: Thu May 22 04:32:14 2014 +0000 Committer: tedyu <[email protected]> Committed: Thu May 22 04:32:14 2014 +0000 ---------------------------------------------------------------------- .../org/apache/hadoop/hbase/filter/Filter.java | 9 +---- .../apache/hadoop/hbase/filter/FilterBase.java | 19 ----------- .../apache/hadoop/hbase/filter/FilterList.java | 35 ++------------------ .../hadoop/hbase/filter/FilterWrapper.java | 13 -------- 4 files changed, 3 insertions(+), 73 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/c45ffa49/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/Filter.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/Filter.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/Filter.java index 754bba8..5e646cd 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/Filter.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/Filter.java @@ -188,17 +188,10 @@ 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(); http://git-wip-us.apache.org/repos/asf/hbase/blob/c45ffa49/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterBase.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterBase.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterBase.java index 78f0a32..4988dc8 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterBase.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterBase.java @@ -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 { } /** http://git-wip-us.apache.org/repos/asf/hbase/blob/c45ffa49/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterList.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterList.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterList.java index 4c8a6c1..41c09ce 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterList.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterList.java @@ -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) { http://git-wip-us.apache.org/repos/asf/hbase/blob/c45ffa49/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterWrapper.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterWrapper.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterWrapper.java index a69bc42..51b2a66 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterWrapper.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterWrapper.java @@ -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);
