hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Rawson <ryano...@gmail.com>
Subject Re: Accessing column information via Thrift/PHP/Scanner
Date Tue, 01 Feb 2011 19:48:57 GMT
when you scan using the shell what do you see?  Note that qualifier
names are just byte[] and thus caps sensitive.

-ryan

On Tue, Feb 1, 2011 at 6:38 AM, Stuart Scott <Stuart.Scott@e-mis.com> wrote:
> Hi,
>
>
>
> Wonder if anyone could offer any advice please? I've been working on
> this for a few hours and can't suss it out.
>
> Using Thrift through PHP, I can loop down a Hbase table fine. I just
> can't pull out the column values associated with the row. The row is
> returned correctly but I can't seem to get access to the column data
> within the column family array. I've tried various things... my latest
> version is below. I've looked in the Hbase wrappers and can't see
> anything obvious I'm doing wrong...
>
>
>
> Any help would be greatly appreciated..
>
>
>
> $tbl="TEST";
>
> $family = array("FNAMEINFO:TOTAL");
> //column family:column
>
> $X=$client->scannerOpen($tbl,"",$family);
>
> while (true )
>
> {
>
> $get_arr = $client->scannerGet($X);
>
> {
>
> if($get_arr == null) break;
>
>  foreach ( $get_arr as $TRowResult )
>
>    {
>
>      $row=$TRowResult->row;
>
>      echo $row;
> //returns the row number correctly
>
>      $column = $TRowResult->columns;
>
>      foreach ($column as $family_column=>$Tcell)
>
>       {
>
>        $rec=$Tcell->value;
> //doesn't return anything for the column family:column
>
>                echo $rec->value;
>
>       }
>
>    }
>
>  }
>
> }
>
>
>
> Regards
>
>
>
> Stuart Scott
>
> System Architect
> emis intellectual technology
> Fulford Grange, Micklefield Lane
> Rawdon Leeds LS19 6BA
> E-mail: stuart.scott@e-mis.com <mailto:stuart.scott@e-mis.com>
> Website: www.emisit.com <outbind://26/www.emisit.com>
>
> Privileged and/or Confidential information may be contained in this
> message. If you are not the original addressee indicated in this message
> (or responsible for delivery of the message to such person), you may not
> copy or deliver this message to anyone. In such case, please delete this
> message, and notify us immediately. Opinions, conclusions and other
> information expressed in this message are not given or endorsed by EMIS
> nor can I conclude contracts on its behalf unless otherwise indicated by
> an authorised representative independently of this message.
>
> EMIS reserves the right to monitor, intercept and (where appropriate)
> read all incoming and outgoing communications. By replying to this
> message and where necessary you are taken as being aware of and giving
> consent to such monitoring, interception and reading.
>
>
> EMIS is a trading name of Egton Medical Information Systems Limited.
> Registered in England. No 2117205. Registered Office: Fulford Grange,
> Micklefield Lane, Rawdon, Leeds, LS19 6BA
>
>
>
>

Mime
View raw message