In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. FilterList
//By setting the operator parameter to Operator.MUST_PASS_ONE, achieve the relationship where each filter in the list is "OR" or //The default operator parameter value is Operator.MUST_PASS_ALL, i.e. the relationship between filters in the list is "and" and FilterList f=new FilterList(FilterList.Operator.MUST_PASS_ONE);
2. How many filters
1、Comparision Filters
1.1 RowFilter √
1.2 FamilyFilter √
1.3 QualifierFilter √
1.4 ValueFilter √
1.5 DependentColumnFilter ×
2、Dedicated Filters
2.1 SingleColumnValueFilter ×
2.2 SingleColumnValueExcludeFilter ×
2.3 PrefixFilter ×
2.4 PageFilter ×
2.5 KeyOnlyFilter ×
2.6 FirstKeyOnlyFilter ×
2.7 TimestampsFilter ×
2.8 RandomRowFilter ×
3、Decorating Filters
3.1 SkipFilter ×
3.2 WhileMatchFilters ×
1.1 RowFilter
Format: RowFilter(CompareFilter.CompareOp rowCompareOp, ByteArrayComparable Comparator)
Parameter 1 Operator Description
Less than
LESS_OR_EQUAL Less than or equal to
EQUAL equals
NOT_EQUAL is NOT equal to
GREATER_OR_EQUAL greater than or equal to
GREATER is greater than
NO_OP excludes all
Parameter 2 ByteArrayComparable Available
BinaryComparator, BinaryPrefixComparator, BitComparator, LongComparator, NullComparator, RegexStringComparator, SubstringComparator
Filter filter=new RowFilter(CompareOp.EQUAL, new BinaryComparator(Bytes.toBytes(RowKey))
Related filtering methods use:
extract rowkey data ending in 01--regular expressions
Filter filter = new RowFilter(CompareFilter.CompareOp.EQUAL,new RegexStringComparator(".* 01$"));
Extract rowkey to contain data for 201407
Filter filter = new RowFilter(CompareFilter.CompareOp.EQUAL,new SubstringComparator("201407"));
Extract rowkey data starting with 123
Filter filter = new RowFilter(CompareFilter.CompareOp.EQUAL,new BinaryPrefixComparator("123".getBytes()));
Select rows with rowkey less than or equal to row010
Filter filter1 = new RowFilter(CompareFilter.CompareOp.LESS_OR_EQUAL,new BinaryComparator("row010".getBytes()));
1.2 FamilyFilter (ditto)
1.3 QualifierFilter (ditto)-------When listed as numbers, doesn't it work? why--------
1.4 ValueFilter (ditto)
1.5 DependentColumnFilter To be continued!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.