hxy2015 / yii2-hbase
Hbase integration for the Yii framework
Installs: 74
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
- ext-curl: *
- yiisoft/yii2: ~2.0.0
This package is not auto-updated.
Last update: 2025-06-12 19:01:55 UTC
README
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist hxy2015/yii2-hbase
or add
"hxy2015/yii2-hbase": "~1.0"
to the require section of your composer.json.
Configuration
To use this extension, you have to configure the Connection class in your application configuration:
return [ //.... 'components' => [ 'hbase' => [ 'class' => 'hxy2015\hbase\Connection', 'host' => 'localhost', 'port' => '8080', ], ] ];
Usage
存储数据
Yii::get('hbase')->tables()->table('user')->row('12')->put('base_info:name', 'huangxiaohu');
查询数据
# 取某一列族数据 Yii::$app->get('hbase')->tables()->table('user')->row('12')->get('base_info'); # 取某一列数据 Yii::$app->get('hbase')->tables()->table('user')->row('12')->get('base_info:name');