Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> Question regarding filtering by column families


Copy link to this message
-
Question regarding filtering by column families
Hi, All

I have this question regarding filtering by column families, basically what
I am doing is to scan a table with a filter on one column family("A") and
process the data of another column family ("B") in the mapper
 my code is as follows:

        FilterList exportFilter = new
FilterList(FilterList.Operator.MUST_PASS_ONE);
        exportFilter.addFilter(new FamilyFilter(CompareOp.EQUAL, new
BinaryComparator("*A*")));

        Scan scan = new Scan();
        scan.addFamily("*B"*);
        scan.setCacheBlocks(false);
        scan.setCaching(10000);
        scan.setFilter(exportFilter);
...

Then somehow the map() method in the mapper class was never executed(The
counter "Map input records" is always 0)

If I comment out the scan.addFamily(..) line, then the map() method would
be executed.

Can someone clarify on this? Should I explicitly add column "A" to the
addFamily()?
Thanks

Haijia
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB