hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Haidinyak <phaidin...@local.com>
Subject RE: doing a scan that will return random columns in a table's family
Date Thu, 03 Feb 2011 16:59:00 GMT
Thanks

-----Original Message-----
From: Buttler, David [mailto:buttler1@llnl.gov] 
Sent: Thursday, February 03, 2011 8:53 AM
To: user@hbase.apache.org
Subject: RE: doing a scan that will return random columns in a table's family

By default that is what you get.  You do have to navigate through the results:

Result.getFamilyMap():

/**
   * Map of qualifiers to values.
   * <p>
   * Returns a Map of the form: <code>Map&lt;qualifier,value></code>
   * @param family column family to get
   * @return map of qualifiers to values
   */
  public NavigableMap<byte[], byte[]> getFamilyMap(byte [] family)


Or if you don't know the family name even, use the Result.getMap() function

/**
   * Map of families to all versions of its qualifiers and values.
   * <p>
   * Returns a three level Map of the form:
   * <code>Map<family,Map&lt;qualifier,Map&lt;timestamp,value>>></code>
   * <p>
   * Note: All other map returning methods make use of this map internally.
   * @return map from families to qualifiers to versions
   */
  public NavigableMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>>
getMap()

-----Original Message-----
From: Pete Haidinyak [mailto:javamann@cox.net] 
Sent: Thursday, February 03, 2011 12:01 AM
To: user@hbase.apache.org
Subject: doing a scan that will return random columns in a table's family

Hi,
	If I have a table:family where I add new columns with computer generated  
column name (I won't know what they are to add them to a scan) is it  
possible to do a scan that returns every column in a row?

Thanks

-Pete


Mime
View raw message