thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Duxbury <br...@rapleaf.com>
Subject Re: How to retrieve qualifier information from TRowResult in Thrift(v0.80) Hbase(v0.90) Php
Date Sat, 26 Nov 2011 17:47:20 GMT
This is a question for the HBase user list, not Thrift's.

On Fri, Nov 25, 2011 at 8:06 PM, Zebra Zhao <zebra2meadow@gmail.com> wrote:

> Hi All,
>
> I created a Hbase table with following schema:
>
> <row_id>  -->  {<cf_id>: [<qualifier_id1>,<qualifier_id2>,...]}
>
> Row record sample:
>
> <"00001"> {<"cf_01">:<"qualifier_01">,<"qualifier_02">,...]}
>
> I wrote following code to retrieve the all the qualifier name associated
> with one TRowResult. Here is the code:
>
> $rowKey = "00001";
> $rowResults = $client->getRow($tableName,$rowKey);
>
> foreach ($rowResults as $rowresult){
> if ($rowresult->row){
>     echo( "row: {$rowresult->row}, cols: \n" );
>     $values = $rowresult->columns;
>     asort( $values );
>
>     foreach ( $values as $k=>$v ) {
>        echo( "  {$k} => {$v->value}\n" );
>     }//foreach
>   }//if
>  }//foreach
>
> However, the output didnot show any qualifier name:
> row: 00001, cols:
> cf_01 =>
>
> My question is how to retrieve the qualifier information from a TRowResult.
> Specifically, how to get "qualifier_01","qualifier_02" using above code.
> I've looked up the Hbase.php  Hbase_type.php, but did not find the useful
> information.
> Any suggestion will be appreciated.
>
> Thank you,
> Zhao
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message