happyBase例子


参考路径:

https://happybase.readthedocs.io/en/latest/


1、安装模块

pip install happybase

2、

root@BigData-Dev-1:~# python

Python 2.7.6 (default, Nov 23 2017, 15:49:48) 

[GCC 4.8.4] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import happybase

>>> connection = happybase.Connection('10.0.10.69')

>>> table = connection.table('shopforce_report:report_time_conf')

>>> table.put(b'1', {b'info:TIME': b'1'})

>>> row = table.row(b'shopforce_product_sale_rank')

>>> print(row[b'info:TIME'])

2018-09-06 00:00:00

>>> quit()

 

你可能感兴趣的:(Hbase)