hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Lucene-hadoop Wiki] Update of "Hbase/HbaseShell/PHP" by udanax
Date Thu, 15 Nov 2007 10:44:11 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lucene-hadoop Wiki" for change notification.

The following page has been changed by udanax:
http://wiki.apache.org/lucene-hadoop/Hbase/HbaseShell/PHP

------------------------------------------------------------------------------
- Describe Hbase/HbaseShell/PHP here.
+ {{{
  
+ include_once("HShellConnect.class.php");
+ 
+   $hbase = new HShellConnect("host_address", port);
+   $result = $hbase-> executeQuery($query);
+ 
+    if($result) {
+     printf("<hr /><b>Result : %s</b><hr />", $result->getRowCount());
+     while($tuple = $result->getNext()) {
+       $tr = $td = null;
+       foreach($tuple as $key => $val) {
+         $tr .= "<th>".$key."</td>";
+         $td .= "<td>".$val."</td>";
+       }
+       printf('<table cellspacing="1" class="result"><tr>%s</tr><tr>%s</tr></table>',
$tr, $td);
+     }
+   }
+ }}}
+ 

Mime
View raw message