hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "Hbase/HbaseShell/PHP" by udanax
Date Fri, 01 Feb 2008 10:08:14 GMT
Dear Wiki user,

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

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

------------------------------------------------------------------------------
+ deleted
- == PHP HQL Connect ==
- It required a higher version version than PHP 5.0.0
  
-  * HQL query test site on 2 node cluster Hbase 
-   * http://shell.hadoop.co.kr/PHPClient.php
- 
- === How to connect to HShell/HQL Server database ===
- Below is the code for connecting to a HShell/HQL Server database. 
- 
- {{{#!java
-   include_once("HShellConnect.class.php");
- 
-   //create an instance of the  HShell connection object
-   $hbase = new HShellConnect("Host_Address", Port_Number);
-   //execute the HQL statement and return records
-   $result = $hbase-> executeQuery("queryString");
- 
-   if($result) {
-     print "Rows Count: ".$result->getRowCount());
- 
-     //carry on looping through while there are records
-     while($tuple = $result->getNext()) {
-       foreach($tuple as $columnName => $cellValue) {
-         print "Column Name: ".$columnName;
-         print "Cell Value: ".$cellValue;
-       }
-     }
-   }
- }}}
- 

Mime
View raw message