Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

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


+
dimpanagr 2013-03-14, 13:06
+
Enis Söztutar 2013-03-15, 03:29
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:

$tmpName=$_FILES["file"]["tmp_name"];
$fp = fopen($tmpName, 'r');
$data = fread($fp, filesize($tmpName));
$data = addslashes($data);
fclose($fp);
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;
        $content=$_GET['username'];
    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.
+
Ted 2013-03-15, 11:41
+
Ted Yu 2013-03-15, 16:24
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB