Support Questions
Find answers, ask questions, and share your expertise

One of multiple HBase Filters being ignored


This is something that should be pretty straightforward that isn't working for some reason. I'm trying to query a table and return rows that match 2 filters. I'm getting a single result that matches one of the filters and doesn't have the other column in it.

I was expecting this code to return all rows where PersonAddressHash =

ba3d1874fee1d9076bde083d819c6a2165ec5790 AND PdfHash =

5151c1394a08a61cbd4d821914bbdca5fa333975dd413685bd1f6b086f555f3e, but its only matching on the PdfHash:

        Scan scan = new Scan();
        // Create filters and add them to scan object
        SingleColumnValueFilter filter1 = new SingleColumnValueFilter(
        SingleColumnValueFilter filter2 = new SingleColumnValueFilter(
        FilterList filters = new FilterList(FilterList.Operator.MUST_PASS_ALL);
        // Read the results into a JSON array, then print it to stdout
        ResultScanner scanner = table.getScanner(scan);
        JSONArray resultsJSON = new JSONArray();
        for (Result result : scanner) {
            JSONObject swap = new JSONObject();
            for (Cell cell : result.listCells()) {
                String qualifier = Bytes.toString(CellUtil.cloneQualifier(cell));
                String value = Bytes.toString(CellUtil.cloneValue(cell));
                swap.put(qualifier, value);

I'm specifying FilterList.Operator.MUST_PASS_ALL yet its only passing one of the filters. My only guess is about the missing column perhaps? Not sure why this isn't working, help appreciated.