hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Desert R. <desert_rose_...@hotmail.com>
Subject HBase Client API: Why does HTable.get(get).getValue() return null if more than one family is added to the get instance?
Date Sun, 10 Jun 2012 15:50:31 GMT

Hi,


    

          
    
        I have a table with 2 column families. The column 'family1' 
has no qualifiers, and the row 'x' has the value \xFF. If I do the 
following

HTable htable = new HTable(config, TABLE_NAME);
Get get = new Get(Bytes.toBytes("x"));
get.addFamily(Bytes.toBytes("family1"));
if(htable.get(get).getValue(Bytes.toBytes("family1"), Bytes.toBytes("")) == null)
  log.debug("Value is null!");


the method getValue() returns not null (as expected). But if I add other family:

HTable htable = new HTable(config, TABLE_NAME);
Get get = new Get(Bytes.toBytes("x"));
get.addFamily(Bytes.toBytes("family1"));
get.addFamily(Bytes.toBytes("family2"));
if(htable.get(get).getValue(Bytes.toBytes("family1"), Bytes.toBytes("")) == null)
  log.debug("Value is null!");


I get a null. Why does this happen? 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message