From 1e959ec37bedbda50a1cb00f856081009a2638af Mon Sep 17 00:00:00 2001 From: Reid Chan Date: Sat, 24 Feb 2018 14:16:36 +0800 Subject: [PATCH] HBASE-20019 Document the ColumnValueFilter --- src/main/asciidoc/_chapters/architecture.adoc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/main/asciidoc/_chapters/architecture.adoc b/src/main/asciidoc/_chapters/architecture.adoc index 9091d5eb76..86582a7d1e 100644 --- a/src/main/asciidoc/_chapters/architecture.adoc +++ b/src/main/asciidoc/_chapters/architecture.adoc @@ -321,6 +321,25 @@ SingleColumnValueFilter filter = new SingleColumnValueFilter( scan.setFilter(filter); ---- +[[client.filter.cv.cvf]] +==== ColumnValueFilter + +Introduced in HBase-2.0.0 version as a complementation of SingleColumnValueFilter, ColumnValueFilter +gets the matched value only, while SingleColumnValueFilter gets the entire row +(has other columns and values) to which the matched cell belongs. Parameters are the same as +SingleColumnValueFilter. + +Note. For simple query like "equales to a family:qualifier:value", we highly recommend to use the following +way instead of using SingleColumnValueFilter or ColumnValueFilter: +[source,java] +Scan scan = new Scan(); +scan.addColumn(family, qualifier); +... + +This scan will restrict to the specified column 'family:qualifier', avoiding scan unrelated +families and columns, which has better performance over filter way. But if query is complicated +beyond this book, then make your good choice case by case. + [[client.filter.cvp]] === Column Value Comparators -- 2.15.0