前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布

Hbase

作者头像
用户5927264
发布2019-12-16 17:22:06
2K0
发布2019-12-16 17:22:06
举报
文章被收录于专栏:OSChinaOSChinaOSChina

后台访问地址:http://192.168.200.151:16010/

COMMAND GROUPS:
  Group name: general
  Commands: status, table_help, version, whoami

  Group name: ddl
  Commands: alter, alter_async, alter_status, create, describe, disable, disable_all, drop, drop_all, enable, 
enable_all, exists, get_table, is_disabled, is_enabled, list, show_filters

  Group name: namespace
  Commands: alter_namespace, create_namespace, describe_namespace, drop_namespace, list_namespace, list_namesp
ace_tables

  Group name: dml
  Commands: append, count, delete, deleteall, get, get_counter, get_splits, incr, put, scan, truncate, truncat
e_preserve

  Group name: tools
  Commands: assign, balance_switch, balancer, balancer_enabled, catalogjanitor_enabled, catalogjanitor_run, ca
talogjanitor_switch, close_region, compact, compact_rs, flush, major_compact, merge_region, move, split, trace
, unassign, wal_roll, zk_dump

  Group name: replication
  Commands: add_peer, append_peer_tableCFs, disable_peer, disable_table_replication, enable_peer, enable_table
_replication, list_peers, list_replicated_tables, remove_peer, remove_peer_tableCFs, set_peer_tableCFs, show_p
eer_tableCFs

  Group name: snapshots
  Commands: clone_snapshot, delete_all_snapshot, delete_snapshot, list_snapshots, restore_snapshot, snapshot

  Group name: configuration
  Commands: update_all_config, update_config

  Group name: quotas
  Commands: list_quotas, set_quota

  Group name: security
  Commands: grant, revoke, user_permission

  Group name: procedures
  Commands: abort_procedure, list_procedures

  Group name: visibility labels
  Commands: add_labels, clear_auths, get_auths, list_labels, set_auths, set_visibility

[root@ha1 sungrow]# cd /soft/hbase-1.1.10/bin [root@ha1 bin]# hbase shell

#添加数据
hbase(main):053:0> put 'shiye_table',"rowkey2","family1:adder","hefei"
0 row(s) in 0.0040 seconds

#查询数据到 rowkey
hbase(main):056:0> get "shiye_table","rowkey2"
COLUMN                       CELL                                                                             
 family1:adder               timestamp=1575856594395, value=hefei                                             
 family1:age                 timestamp=1575856605415, value=123                                               
 family1:cell                timestamp=1575856467046, value=zhangsan                                          
3 row(s) in 0.0070 seconds

#查询数据到 rowkey,列族
hbase(main):057:0> get "shiye_table","rowkey2","family1"
COLUMN                       CELL                                                                             
 family1:adder               timestamp=1575856594395, value=hefei                                             
 family1:age                 timestamp=1575856605415, value=123                                               
 family1:cell                timestamp=1575856467046, value=zhangsan 

#查询数据到 rowkey,列族,列
hbase(main):059:0> get "shiye_table","rowkey2","family1:cell"
COLUMN                       CELL                                                                             
 family1:cell                timestamp=1575856467046, value=zhangsan                                          
1 row(s) in 0.0070 seconds


#查询全部数据
hbase(main):060:0> scan "shiye_table"

#开始于
hbase(main):067:0> scan "shiye_table",{STARTROW=>'rowkey3'}
ROW                          COLUMN+CELL                                                                      
 rowkey3                     column=family1:cell, timestamp=1575856481919, value=lisi                         
 rowkey4                     column=family1:cell, timestamp=1575856493361, value=1234                         
 rowkey5                     column=family1:cell, timestamp=1575856510335, value=9876                         
 rowkey6                     column=family1:cell, timestamp=1575856521387, value=7654                         
4 row(s) in 0.0070 seconds

#结束于
hbase(main):068:0> scan "shiye_table",{STOPROW=>'rowkey3'}
ROW                          COLUMN+CELL                                                                      
 rowkey1                     column=family1:cell, timestamp=1575855779825, value=value_shiye                  
 rowkey2                     column=family1:adder, timestamp=1575856594395, value=hefei                       
 rowkey2                     column=family1:age, timestamp=1575856605415, value=123                           
 rowkey2                     column=family1:cell, timestamp=1575856467046, value=zhangsan                     
2 row(s) in 0.0170 seconds
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
TDSQL MySQL 版
TDSQL MySQL 版(TDSQL for MySQL)是腾讯打造的一款分布式数据库产品,具备强一致高可用、全球部署架构、分布式水平扩展、高性能、企业级安全等特性,同时提供智能 DBA、自动化运营、监控告警等配套设施,为客户提供完整的分布式数据库解决方案。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档