hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars George <lars.geo...@gmail.com>
Subject Re: hbase
Date Wed, 05 Jan 2011 18:57:51 GMT
I never got that reverse logic, who came up with that?

On Wed, Jan 5, 2011 at 6:59 PM, Jean-Daniel Cryans <jdcryans@apache.org> wrote:
> What you are doing is filtering out the rows with the value you are looking for.
>
> J-D
>
> On Wed, Jan 5, 2011 at 12:45 AM, how to get the  cell value
> <ventlcc@gmail.com> wrote:
>>  I would like to get specified value from the table which don't mind its family
>> and column.
>>   I used ValueFilter to make it ,but i get nothing .
>>   My code is :
>>
>>                try
>>                {
>>                           HTable htable = new
>> HTable(hconf,Bytes.toBytes(tablename));
>>
>>                           ValueFilter vfilter = new
>> ValueFilter(CompareOp.EQUAL,new BinaryComparator(Bytes.toBytes(value)));
>>
>>                           Scan s =new Scan();
>>                           s.setFilter(vfilter);
>>                           ResultScanner rscanner = htable.getScanner(s);
>>                           for(Result rs : rscanner)
>>                           {
>>                                   byte [] by =
>> rs.getValue(Bytes.toBytes(tablename));
>>
>>                                        String vt= Bytes.toString(by);
>>                                         System.out.println("The
value is "+ vt);
>>                           }
>>
>>                }
>>                catch(IOException e)
>>                {
>>                        e.printStackTrace();
>>                }
>>
>>
>

Mime
View raw message