Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> Store images in Hbase using Thrift and Php

Copy link to this message
Re: Store images in Hbase using Thrift and Php
Thank you for your reply. I have seen DemoClient.php and tried to use
mutateRow with a code like:

$fp = fopen($tmpName, 'r');
$data = fread($fp, filesize($tmpName));
$data = addslashes($data);
new Mutation( array(
            'column' => 'info:pic',
            'value' => $data
            ) ),
$client->mutateRow( $t, $username, $mutations );

and then:

$arr = $client->getRow($t, $username);
foreach ( $arr as $k=>$TRowResult  ) {
$values = $TRowResult->columns;
asort( $values );
foreach ( $values as $k=>$v ) {
        $usr= $v->value;
    header('Content-type: image/jpg');
        echo $usr;

But failed to display the image.
Enis Söztutar wrote
> If you check out the latest source code, there are some examples under
> hbase-examples/src/main/php.
> Enis

View this message in context: http://apache-hbase.679495.n3.nabble.com/Store-images-in-Hbase-using-Thrift-and-Php-tp4040223p4040323.html
Sent from the HBase User mailing list archive at Nabble.com.