2017 © Pedro Peláez
 

library php-smart-hbase

Hbase extension

image

kuchar/php-smart-hbase

Hbase extension

  • Tuesday, March 27, 2018
  • by kuch4r
  • Repository
  • 2 Watchers
  • 3 Stars
  • 1,184 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 33 % Grown

The README.md

PHP HBase Lib

This lib is based on HBase Thrift and python happybase package, (*1)

Usage

```$php use kuchar\smarthbase\SmartHConnection;, (*2)

$uri = "example.hbase.host.com:9090/?protocol=binary&transport=framed" $connection = new SmartHConnection($uri);, (*3)

$table = $connection->table('test');, (*4)

put one row

$table->put('row_id', ['cf:column_name' => 'value']);, (*5)

read one row

$table->row('row_id');, (*6)

put many rows row

$table->put('row_id1', ['cf:column_name' => 'value1']); $table->put('row_id2', ['cf:column_name' => 'value2']);, (*7)

read multiple rows

$table->rows(['row_id1', 'row_id2']);, (*8)

scan table

$items = [] foreach( $table->scan() as $row => $vals) { $items[$row] = $vals; }, (*9)

delete whole row

$table->delete('row_id1');, (*10)

delete column from row

$table->delete('row_id2', ['cf:column_name']);, (*11)

batch operations

$batch = new SmartHBatch($table); $batch->put('row_id1', ['cf:column_name' => 'value1']); $batch->put('row_id2', ['cf:column_name' => 'value2']); $batch->send();, (*12)


## Testing ```$bash # copy default config template and set missing parameters cp tests/phpunit.xml.dist tests/phpunit.xml # run tests ./vendor/bin/phpunit -c tests/phpunit.xml tests

The Versions

27/03 2018

dev-master

9999999-dev

Hbase extension

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by Paweł Kucharski

extensions hbase

27/03 2018

2.1.0

2.1.0.0

Hbase extension

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by Paweł Kucharski

extensions hbase

28/02 2018

2.0.0

2.0.0.0

Hbase extension

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by Paweł Kucharski

extensions hbase

24/10 2017

1.0.0

1.0.0.0

Hbase extension

  Sources   Download

MIT

The Requires

  • php >=5.3

 

by Paweł Kucharski

extensions hbase

31/05 2016

v0.1-beta

0.1.0.0-beta

Hbase extension

  Sources   Download

MIT

The Requires

  • php >=5.3

 

by Paweł Kucharski

extensions hbase