Package com.ngdata.hbaseindexer.parse

Examples of com.ngdata.hbaseindexer.parse.ByteArrayExtractor.extract()


    }

    @Test
    public void testExtract() {
        ByteArrayExtractor extractor = new PrefixMatchingQualifierExtractor(COLFAM_A, Bytes.toBytes("A"));
        assertByteArraysEquals(Lists.newArrayList(QUALIFIER_A1, QUALIFIER_A2), extractor.extract(result));
    }

    @Test
    public void testExtract_EmptyPrefix() {
        ByteArrayExtractor extractor = new PrefixMatchingQualifierExtractor(COLFAM_A, new byte[0]);
View Full Code Here


    }

    @Test
    public void testExtract_EmptyPrefix() {
        ByteArrayExtractor extractor = new PrefixMatchingQualifierExtractor(COLFAM_A, new byte[0]);
        assertByteArraysEquals(Lists.newArrayList(QUALIFIER_A1, QUALIFIER_A2), extractor.extract(result));
    }

    @Test
    public void testExtract_FullCellName() {
        ByteArrayExtractor extractor = new PrefixMatchingQualifierExtractor(COLFAM_A, Bytes.toBytes("A1"));
View Full Code Here

    }

    @Test
    public void testExtract_FullCellName() {
        ByteArrayExtractor extractor = new PrefixMatchingQualifierExtractor(COLFAM_A, Bytes.toBytes("A1"));
        assertByteArraysEquals(Lists.newArrayList(QUALIFIER_A1), extractor.extract(result));
    }

    @Test
    public void testExtract_NoMatches() {
        ByteArrayExtractor extractor = new PrefixMatchingQualifierExtractor(COLFAM_A, Bytes.toBytes("doesnt exist"));
View Full Code Here

    }

    @Test
    public void testExtract_NoMatches() {
        ByteArrayExtractor extractor = new PrefixMatchingQualifierExtractor(COLFAM_A, Bytes.toBytes("doesnt exist"));
        assertTrue(extractor.extract(result).isEmpty());
    }

}
View Full Code Here

    }

    @Test
    public void testExtract() {
        ByteArrayExtractor extractor = new PrefixMatchingCellExtractor(COLFAM_A, Bytes.toBytes("A"));
        assertByteArraysEquals(Lists.newArrayList(VALUE_A1, VALUE_A2), extractor.extract(result));
    }

    @Test
    public void testExtract_EmptyPrefix() {
        ByteArrayExtractor extractor = new PrefixMatchingCellExtractor(COLFAM_A, new byte[0]);
View Full Code Here

    }

    @Test
    public void testExtract_EmptyPrefix() {
        ByteArrayExtractor extractor = new PrefixMatchingCellExtractor(COLFAM_A, new byte[0]);
        assertByteArraysEquals(Lists.newArrayList(VALUE_A1, VALUE_A2), extractor.extract(result));
    }

    @Test
    public void testExtract_FullCellName() {
        ByteArrayExtractor extractor = new PrefixMatchingCellExtractor(COLFAM_A, Bytes.toBytes("A1"));
View Full Code Here

    }

    @Test
    public void testExtract_FullCellName() {
        ByteArrayExtractor extractor = new PrefixMatchingCellExtractor(COLFAM_A, Bytes.toBytes("A1"));
        assertByteArraysEquals(Lists.newArrayList(VALUE_A1), extractor.extract(result));
    }

    @Test
    public void testExtract_NoMatches() {
        ByteArrayExtractor extractor = new PrefixMatchingCellExtractor(COLFAM_A, Bytes.toBytes("doesnt exist"));
View Full Code Here

    }

    @Test
    public void testExtract_NoMatches() {
        ByteArrayExtractor extractor = new PrefixMatchingCellExtractor(COLFAM_A, Bytes.toBytes("doesnt exist"));
        assertTrue(extractor.extract(result).isEmpty());
    }
   
    @Test
    public void testGetColumnQualifier() {
        assertNull(new PrefixMatchingCellExtractor(COLFAM_A, Bytes.toBytes("A1")).getColumnQualifier());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.