Hbase常用命令总结
一.HBASE常见命令
1.进入hbase的bin目录: cd /hbase/bin
2.进入hbase:hbase shell
3.查看当前数据表:list
4.查看表结构: describe \’protocol.data\’
如:
5.查询表所有数据:scan ‘table name’
6.统计表里有多少行:count \’protocol.data\’
如:
7.设置条件统计表里有多少行:count \’protocol.data\’,INTERVAL=>10000
8.定向查找:scan \’protocol.data\’, { TIMERANGE => [1528765200,1528797600]} 这里要注意hbase要使用到毫秒(换算工具https://tool.lu/timestamp/)
二.HBASE基本简介
1.rowkey
get \’t_vehicle_real_time_data\’, “rowkey值”