/** Create a filter that will match a given family, qualifier, and cells per qualifier. */ private RowFilter createColumnSpecFilter(SingleColumnValueFilter filter) throws IOException { return RowFilter.newBuilder() .setChain( Chain.newBuilder() .addFilters( RowFilter.newBuilder() .setFamilyNameRegexFilter( Bytes.toString(quoteRegularExpression(filter.getFamily())))) .addFilters( RowFilter.newBuilder() .setColumnQualifierRegexFilter( ByteStringer.wrap(quoteRegularExpression(filter.getQualifier())))) .addFilters(createVersionLimitFilter(filter))) .build(); }
private RowFilter createFamilyFilter(byte[] familyName) { return RowFilter.newBuilder() .setFamilyNameRegexFilterBytes(ByteStringer.wrap(quoteRegex(familyName))) .build(); }
private RowFilter createColumnQualifierFilter(byte[] unquotedQualifier) { return RowFilter.newBuilder() .setColumnQualifierRegexFilter(ByteStringer.wrap(quoteRegex(unquotedQualifier))) .build(); }