定制 kuchar/php-smart-hbase 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kuchar/php-smart-hbase

Composer 安装命令:

composer require kuchar/php-smart-hbase

包简介

Hbase extension

README 文档

README

This lib is based on HBase Thrift and python happybase package

Usage

use kuchar\smarthbase\SmartHConnection;

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

$table = $connection->table('test');

# put one row
$table->put('row_id', ['cf:column_name' => 'value']);

# read one row
$table->row('row_id');

# put many rows row
$table->put('row_id1', ['cf:column_name' => 'value1']);
$table->put('row_id2', ['cf:column_name' => 'value2']);


# read multiple rows
$table->rows(['row_id1', 'row_id2']);

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

# delete whole row
$table->delete('row_id1');

# delete column from row
$table->delete('row_id2', ['cf:column_name']);

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

Testing

# 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

统计信息

  • 总下载量: 11.4k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-03-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固