说明:新建student表,该表有两列 名称和地址,名称只有一个,address可以有多个,
2、插入操作:
插入一条记录,只能插入某列:put 'student','row1','name','tom'
说明:向student有中插入记录,记录的row值为row1,列name的值为tom 插入列簇
地址簇插入家庭地址:put 'student','row1','address:home','ShiDai Street' 地址簇插入学校地址:put 'student','row1','address:school','BinAn Street' 查询学生的家庭地址:get 'student','row1',{COLUMN=>'address:home'}
3. 更新操作:
根据row值 查询一条记录:get 'student','row1'
根据row值更新name值 (系统会直接更新): put 'student','row1','name','tom2' 再查询时,系统返回最新的值: get 'student','row1'
根据timestamp查询更新之前的 name值:lsi
get 'student','row1',{COLUMN=>'name',TIMESTAMP=>1301473112875} 5、删除操作d
删除Id为temp的值的“info:age ”:delete 'student','temp','info:age' ls
删除整行: deleteall 'student','tom'
将整张表清空: truncate ''student'
设置表不可用: disable 'student'
删除表: drop 'student'
6、查询操作
查询数据库中所有的表:list
查询student表中所有数据:Scan 'student'
查看student表中address列族的所有数据:scan 'student',{COLUMNS =>'address'} Get一行:get ''student' , 'row1'
查询表是否存在:exists 'student'
查询表结构:describe 'student'
查询服务器状态:status
如:3 servers, 0 dead,1.0000 average load
查询hbase版本:version
如:0.90.4, r1150278, Sun Jul 24 15:53:29 PDT 2011
7、其他操作:
判断表是否enable 或disable:is_enabled 'student'或 is_disabled 'student'
关闭shell: exit
HBase Shell常用命令_计算机软件及应用_IT/计算机_专业资料。HBase Shell 常用... 第02章 shell及常用命令 19页 免费 HBase接口shell常用命令 暂无评价 3页 ...
Hbase shell 常用命令下面我们看看 HBase Shell 的一些基本操作命令,我列出了几个常用的 HBase Shell 命令, 如下: 名称 创建表 添加记录 查看记录 查看表中的记录...
Hbase常用命令_计算机软件及应用_IT/计算机_专业资料。Hbase常用命令 DDL/DML... 第六讲 常用命令(4) 暂无评价 15页 免费 HBase接口shell常用命令 暂无评价 ...
hbase shell操作命令_计算机软件及应用_IT/计算机_专业资料。下面我们看看 HBase... HBase接口shell常用命令 3页 免费 简单shell命令操作 暂无评价 12页 免费 ...
Hbase shell 下面我们看看 HBase Shell 的一些基本操作命令,我列出了几个常用的 HBase Shell 命令, 如下: 名称 创建表 添加记录 查看记录 查看表中的记录总数 ...
下面我们看看 HBase Shell 的一些基本操作命令,我列出了几个常用的 HBase Shell 命令, 如下: 名称 创建表 添加记录 查看记录 查看表中的记录总数 删除记录 删除...
drop 't1' 以上是一些常用命令详解,具体的所有 hbase 的 shell 命令如下,分... Hive的HBase存储接口 10页 1下载券 Hive and hbase 入门 26页 1下载券 三...
hbase shell_计算机软件及应用_IT/计算机_专业资料。今日推荐 四季养生 中医... HBase接口shell常用命令 暂无评价 3页 免费 补充shell编程 107页 免费 Shell...
1、 数据类型,Hbase只有简单的字符串类型,所有类型都是交由用户自己处理,它只... HBase接口shell常用命令 暂无评价 3页 免费 HBase 56页 1下载券 hbase 4页 ...
数据导入HBase最常用的三种方式_计算机软件及应用_IT/计算机_专业资料。数据导入...从 HBase 的客户端服务器从过 HBase 的 Shell 命令行,连接到 HBase 的集群。...
热门文档