forked from 3con/pop_hbase
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve documentation; Fix default port in curl connection; Add reque…
…st api
- Loading branch information
Showing
11 changed files
with
125 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Getting started | ||
=============== | ||
|
||
Installing HBase | ||
---------------- | ||
|
||
We found the cloudera distribution to be the easiest way to get started. If you run Ubuntu, Debian or RedHat, the package are integrated with apt-get and yum. However, desptite respecting the Unix conventions, we found the installation quite inconvient, having constantly to search for config, bin, data files all dispatched over the filesystem. For this reason, we usually download the package from `http://archive.cloudera.com/cdh/3/` and install each of them manually. | ||
|
||
Starting HBase | ||
-------------- | ||
|
||
It seems like Stargate took the place of the old REST namespace. However, i need confirmation on this one. So if i'm right, assuming `${HBASE_HOME}/bin` is in your classpath, starting Hbase with REST connector is as follow: | ||
|
||
start-hbase.sh | ||
hbase-daemon.sh start rest | ||
|
||
And stoping: | ||
|
||
hbase-daemon.sh stop rest | ||
stop-hbase.sh | ||
|
||
Requiring Pop HBase | ||
------------------- | ||
|
||
The source code organisation comply with [PEAR naming conventions][pear] and the [PHP Framework Interop Group PSR-0][psr] for autoloader interoperability. | ||
|
||
If you do not use a autoloader, simply download and unpack the source code and finally require `pop_hbase.inc.php` present in the `src` folder. The script will require the classes for you. | ||
|
||
require(dirname(__FILE__).'/pop_hbase/src/pop_hbase.inc.php'); | ||
|
||
Creating a connection | ||
--------------------- | ||
|
||
See the documentation relative to the connection for more details. | ||
|
||
$hbase = new PopHbase(array( | ||
"host" => "127.0.0.1", | ||
"port" => "8080", | ||
)); | ||
|
||
|
||
[pear]: http://pear.php.net/ "PEAR projects" | ||
[psr]: http://groups.google.com/group/php-standards/web/psr-0-final-proposal "PHP Framework Interop Group" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Server information: Command relative to version and server status | ||
================================================================= | ||
|
||
Query Software Version | ||
---------------------- | ||
|
||
$hbase->getVersion(); | ||
|
||
Will return something similar to: | ||
|
||
{ Server: 'jetty/6.1.24' | ||
, REST: '0.0.2' | ||
, OS: 'Mac OS X 10.6.4 x86_64' | ||
, Jersey: '1.1.5.1' | ||
, JVM: 'Apple Inc. 1.6.0_20-16.3-b01-279' | ||
} | ||
|
||
Query Storage Cluster Version | ||
----------------------------- | ||
|
||
$hbase->getVersionCluster(); | ||
|
||
Will return something similar to: | ||
|
||
'0.89.20100726' | ||
|
||
Query Storage Cluster Status | ||
---------------------------- | ||
|
||
$hbase->getStatusCluster(); | ||
|
||
Will return something similar to: | ||
|
||
{ requests: 0 | ||
, regions: 3 | ||
, averageLoad: 3 | ||
, DeadNodes: [ null ] | ||
, LiveNodes: [ { Node: [Object] } ] | ||
} | ||
|
||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters