Search in sources :

Example 1 with TokenizerRowSearchResult

use of org.apache.hadoop.hbase.codec.prefixtree.encode.tokenize.TokenizerRowSearchResult in project hbase by apache.

the class TestTokenizer method testSearching.

@Test
public void testSearching() {
    for (byte[] input : inputs) {
        TokenizerRowSearchResult resultHolder = new TokenizerRowSearchResult();
        builder.getNode(resultHolder, input, 0, input.length);
        TokenizerNode n = resultHolder.getMatchingNode();
        byte[] output = n.getNewByteArray();
        Assert.assertTrue(Bytes.equals(input, output));
    }
}
Also used : TokenizerNode(org.apache.hadoop.hbase.codec.prefixtree.encode.tokenize.TokenizerNode) TokenizerRowSearchResult(org.apache.hadoop.hbase.codec.prefixtree.encode.tokenize.TokenizerRowSearchResult) Test(org.junit.Test)

Aggregations

TokenizerNode (org.apache.hadoop.hbase.codec.prefixtree.encode.tokenize.TokenizerNode)1 TokenizerRowSearchResult (org.apache.hadoop.hbase.codec.prefixtree.encode.tokenize.TokenizerRowSearchResult)1 Test (org.junit.Test)1