Skip to content

yii2 extension for hbase client using restful api.

Notifications You must be signed in to change notification settings

hxy2015/yii2-hbase

Repository files navigation

Installation

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');

About

yii2 extension for hbase client using restful api.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages