A fuzzy row approach is effective for this kind of requirements and when the data is huge: As explained in the article, FuzzyRowFilter takes as a parameter a string of string and information about the mask. In the above example, if we want to find the last registered users, and the format of the string key is userId_actionId_timestamp (where userId has a fixed length, for example 4 characters), the fuzzy string key we are looking for is "???? login". This leads to the following parameters for FuzzyRowKey:
FuzzyRowFilter rowFilter = new FuzzyRowFilter( Arrays.asList( new Pair<byte[], byte[]>( Bytes.toBytesBinary("\x00\x00\x00\x00_login_"), new byte[] {1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0})));
Ram ghadiyaram
source share