HBase表描述
来源:互联网 发布:淘宝卖笔记本要3c 编辑:程序博客网 时间:2024/06/10 09:27
1、通过hbase shell命令操作:
describe ‘tablename’
显示emp表的描述,输入命令:describe ‘emp’,结果如下:
2、使用thrift API接口显示表的信息,代码如下:
# coding=utf-8 from thrift.transport.TSocket import TSocket from thrift.transport.TTransport import TBufferedTransport from thrift.protocol import TBinaryProtocol from hbase import Hbase # 主机地址及端口号,端口号默认为9090 host = 'localhost' port = 9090 # 初始化链接 transport = TBufferedTransport(TSocket(host, port)) transport.open() protocol = TBinaryProtocol.TBinaryProtocol(transport) client = Hbase.Client(protocol) # 显示表列组的描述 print client.getColumnDescriptors('empbypy') transport.close()
运行结果如下:
阅读全文
0 0
- HBase表描述
- HBase表描述和修改
- HBase描述
- HBase简单QL语句描述
- 描述表
- [HBase] hbase shell 表定义
- 80386简介--描述段描述符表
- 描述符表和描述符高速缓存
- 描述符表和描述符高速缓存
- 描述符表和描述符高速缓存
- 描述符表和描述符高速缓存
- 编程等级描述表
- 活动联接描述表
- 设备描述表(DC)
- 中断描述符表
- 设备描述表
- 中断描述符表
- 中断描述符表
- mysql索引总结----mysql 索引类型以及创建
- 深度学习领域三大牛LeCun、Bengio和Hinton 联合打造史上最权威综述
- volitale原理
- Linux下的Nagios安装配置
- meta标签content=“IE=edge,chrome=1”解析
- HBase表描述
- Could not find class 'com.google.gson.Gson', referenced from method com.example.test.json.JsonUtil.S
- java.lang.IllegalArgumentException: Name for argument type [java.lang.String] not available, and p
- 如何理解字(word)、字节(byte)、比特(bit)
- BI选型的十大参考
- 小易喜欢的数列
- hdu6124--Euler theorem
- 前台js控制字数限制
- 自传播是什么?如何定义?