PHP Hbase Thrift client returns array instead of TRowResult

We are using the Thrift client to access Hbase from PHP. Hbase version is hbase-0.90.4-cdh3u3.

My problem (well, it's more like a doubt) is that the Thrift API is supposed to return TRowResult for a number of methods, for example: scannerGet, getRowWithColumns... Instead, it returns an array with a single TRowResult instance.

Does anyone know why is that? Is there any case when these methods - that typically are supposed to return a single row or none - return more than one TRowResult instances? Can I simply pop this one row in my wrapper class and return it instead of returning the array (or null if there's empty array)?

The .thrift documentation is pretty clear about what is supposed to be returned:

/** 
 * Get the specified columns for the specified table and row at the latest
 * timestamp. Returns an empty list if the row does not exist.
 * 
 * @return TRowResult containing the row and map of columns to TCells
 */
list<TRowResult> getRowWithColumns(

[...]

/**
 * Returns the scanner's current row value and advances to the next
 * row in the table.  When there are no more rows in the table, or a key
 * greater-than-or-equal-to the scanner's specified stopRow is reached,
 * an empty list is returned.
 *
 * @return a TRowResult containing the current row and a map of the columns to TCells.
 *
 * @throws IllegalArgument if ScannerID is invalid
 *
 * @throws NotFound when the scanner reaches the end
 */
list<TRowResult> scannerGet(

(Although @throws NotFound is obsolete)

Thanks!

Answers


There are getRows() and scannerGetList() methods, which returns array of TRowResult objects. I used hbase from cdh3u4, don't know if theese methods exists in cdh3u3. BTW, cdh4 should already containn hbase 0.92 and support scan filters ;)


Need Your Help

Can we use CSS in a Silverlight project

silverlight

I have a problem. I want to make a web application using silver light. I just want to know that can I use a css in this, because I read the the designing of silver light is in the xaml or we use cs...

How to give the space between two linear layout in Android

android android-layout

I am using following code to generate the page. I am able to make the space between linear layout which is just below the another one. But when i am trying to do between two linear layout which are