Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

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


Copy link to this message
-
Re: Question regarding filtering by column families
sorry, the "*" is typo, or caused by copy-and-paste-from-eclipse

On Tue, Mar 6, 2012 at 1:59 PM, T Vinod Gupta <[EMAIL PROTECTED]> wrote:

> why do you have "*A*" and "*B*".. it should simply be "A" and "B". also you
> need to do Bytes.toBytes("A"). This should work.
>
> thanks
>
> On Tue, Mar 6, 2012 at 10:45 AM, Haijia Zhou <[EMAIL PROTECTED]> wrote:
>
> > 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
> >
>