Hi Again

In my previous example I seem to have misplaced a "new" keyword (new
myvalue1.getBytes() where it should have been myvalue1.getBytes()).

On another note my program hangs when I supply my own filter to the
scanner (I suppose it's clear that the nodes don't know my class so
there should be a ClassNotFoundException right?).

Regards
David Alves 


On Mon, 2008-02-11 at 16:51 +0000, David Alves wrote: 
> Hi Guys
>       In my previous email I might have misunderstood the roles of the
> RowFilterInterfaces so I'll pose my question more clearly (since the
> last one wasn't in question form :)).
>       I save a setup when a table has to columns belonging to different
> column families (Table A cf1:a cf2:b));
> 
> I'm trying to build a filter so that a scanner only returns the rows
> where cf1:a = myvalue1 and cf2:b = myvalue2.
> 
> I've build a RegExpRowFilter like this;
> Map<Text, byte[]> conditionalsMap = new HashMap<Text, byte[]>();
>               conditionalsMap.put(new Text(cf1:a), new myvalue1.getBytes());
>               conditionalsMap.put(new Text(cf2:b), myvalue2.getBytes());
>               return new RegExpRowFilter(".*", conditionalsMap);
> 
> My problem is this filter always fails when I know for sure that there
> are rows whose columns match my values.
> 
> I'm building the the scanner like this (the purpose in this case is to
> find if there are more values that match my filter):
> 
> final Text startKey = this.htable.getStartKeys()[0];
>                       HScannerInterface scanner = htable.obtainScanner(new 
> Text[] {new
> Text(cf1:a), new Text(cf2:b)}, startKey, rowFilterInterface);
>                       return scanner.iterator().hasNext();
> 
> Can anyone give me a hand please.
> 
> Thanks in advance
> David Alves
> 
> 
> 

Reply via email to