hbase shell

HBase shell操作 一、HBase常用shell操作 1、进入HBase客户端命令操作界面 $ bin/hbase shell 2、查看帮助命令 hbase(main):001:0> help 3、查看当前数据库中有哪些表 hbase(main):002:0> list 4、创建一张表 创建user表,包含info、data两个列族 hbase(main):010:0> creat... 阅读详情
[wangshumin@centoshostnameKL1 bin]$ hbase
Usage: hbase [<options>] <command> [<args>]
Options:
  --config DIR    Configuration direction to use. Default: ./conf
  --hosts HOSTS   Override the list in 'regionservers' file
  --auth-as-server Authenticate to ZooKeeper using servers configuration


Commands:
Some commands take arguments. Pass no args or -h for usage.
  shell           Run the HBase shell
  hbck            Run the hbase 'fsck' tool
  snapshot        Create a new snapshot of a table
  snapshotinfo    Tool for dumping snapshot information
  wal             Write-ahead-log analyzer
  hfile           Store file analyzer
  zkcli           Run the ZooKeeper shell
  upgrade         Upgrade hbase
  master          Run an HBase HMaster node
  regionserver    Run an HBase HRegionServer node
  zookeeper       Run a Zookeeper server
  rest            Run an HBase REST server
  thrift          Run the HBase Thrift server
  thrift2         Run the HBase Thrift2 server
  clean           Run the HBase clean up script
  classpath       Dump hbase CLASSPATH
  mapredcp        Dump CLASSPATH entries required by mapreduce
  pe              Run PerformanceEvaluation
  ltt             Run LoadTestTool
  version         Print the version
  CLASSNAME       Run the class named CLASSNAME
[wangshumin@centoshostnameKL1 bin]$ hbase shell
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/wangshumin/hbase/hbase-1.2.1/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/wangshumin/app/hadoop-2.4.1/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.2.1, r8d8a7107dc4ccbf36a92f64675dc60392f85c015, Wed Mar 30 11:19:21 CDT 2016


hbase(main):001:0> l
NameError: undefined local variable or method `l' for #<Object:0x7dfc05>


hbase(main):002:0> show
NameError: undefined local variable or method `show' for #<Object:0x7dfc05>


hbase(main):003:0> show databases;
hbase(main):004:0* 
 
hbase(main):023:0* ll
NameError: undefined local variable or method `ll' for #<Object:0x7dfc05>


hbase(main):024:0> help
HBase Shell, version 1.2.1, r8d8a7107dc4ccbf36a92f64675dc60392f85c015, Wed Mar 30 11:19:21 CDT 2016
Type 'help "COMMAND"', (e.g. 'help "get"' -- the quotes are necessary) for help on a specific command.
Commands are grouped. Type 'help "COMMAND_GROUP"', (e.g. 'help "general"') for help on a command group.


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, locate_region, show_filters


  Group name: namespace
  Commands: alter_namespace, create_namespace, describe_namespace, drop_namespace, list_namespace, list_namespace_tables


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


  Group name: tools
  Commands: assign, balance_switch, balancer, balancer_enabled, catalogjanitor_enabled, catalogjanitor_run, catalogjanitor_switch, close_region, compact, compact_rs, flush, major_compact, merge_region, move, normalize, normalizer_enabled, normalizer_switch, 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_peer_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, list_security_capabilities, 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



SHELL USAGE:
Quote all names in HBase Shell such as table and column names.  Commas delimit
command parameters.  Type <RETURN> after entering a command to run it.
Dictionaries of configuration used in the creation and alteration of tables are
Ruby Hashes. They look like this:


  {'key1' => 'value1', 'key2' => 'value2', ...}


and are opened and closed with curley-braces.  Key/values are delimited by the
'=>' character combination.  Usually keys are predefined constants such as
NAME, VERSIONS, COMPRESSION, etc.  Constants do not need to be quoted.  Type
'Object.constants' to see a (messy) list of all constants in the environment.


If you are using binary keys or values and need to enter them in the shell, use
double-quote'd hexadecimal representation. For example:


  hbase> get 't1', "key\x03\x3f\xcd"
  hbase> get 't1', "key\003\023\011"
  hbase> put 't1', "test\xef\xff", 'f1:', "\x01\x33\x40"


The HBase shell is the (J)Ruby IRB with the above HBase-specific commands added.
For more on the HBase Shell, see http://hbase.apache.org/book.html
hbase(main):025:0> version
1.2.1, r8d8a7107dc4ccbf36a92f64675dc60392f85c015, Wed Mar 30 11:19:21 CDT 2016


hbase(main):026:0> whoami
wangshumin (auth:SIMPLE)
    groups: wangshumin


hbase(main):027:0> status
1 active master, 0 backup masters, 3 servers, 0 dead, 2.0000 average load


hbase(main):028:0> list
TABLE                                                                                                            
Tuser_info                                                                                                       
t1                                                                                                               
t2                                                                                                               
user_info                                                                                                        
4 row(s) in 1.4290 seconds


=> ["Tuser_info", "t1", "t2", "user_info"]
hbase(main):029:0> create


ERROR: wrong number of arguments (0 for 1)


Here is some help for this command:
Creates a table. Pass a table name, and a set of column family
specifications (at least one), and, optionally, table configuration.
Column specification can be a simple string (name), or a dictionary
(dictionaries are described below in main help output), necessarily 
including NAME attribute. 
Examples:


Create a table with namespace=ns1 and table qualifier=t1
  hbase> create 'ns1:t1', {NAME => 'f1', VERSIONS => 5}


Create a table with namespace=default and table qualifier=t1
  hbase> create 't1', {NAME => 'f1'}, {NAME => 'f2'}, {NAME => 'f3'}
  hbase> # The above in shorthand would be the following:
  hbase> create 't1', 'f1', 'f2', 'f3'
  hbase> create 't1', {NAME => 'f1', VERSIONS => 1, TTL => 2592000, BLOCKCACHE => true}
  hbase> create 't1', {NAME => 'f1', CONFIGURATION => {'hbase.hstore.blockingStoreFiles' => '10'}}
  
Table configuration options can be put at the end.
Examples:


  hbase> create 'ns1:t1', 'f1', SPLITS => ['10', '20', '30', '40']
  hbase> create 't1', 'f1', SPLITS => ['10', '20', '30', '40']
  hbase> create 't1', 'f1', SPLITS_FILE => 'splits.txt', OWNER => 'johndoe'
  hbase> create 't1', {NAME => 'f1', VERSIONS => 5}, METADATA => { 'mykey' => 'myvalue' }
  hbase> # Optionally pre-split the table into NUMREGIONS, using
  hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
  hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'}
  hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit', REGION_REPLICATION => 2, CONFIGURATION => {'hbase.hregion.scan.loadColumnFamiliesOnDemand' => 'true'}}
  hbase> create 't1', {NAME => 'f1', DFS_REPLICATION => 1}


You can also keep around a reference to the created table:


  hbase> t1 = create 't1', 'f1'


Which gives you a reference to the table named 't1', on which you can then
call methods.




hbase(main):030:0> 
hbase的搭建、hbase shell的使用、Hbase的Python操作、Hbase整合Hive 搭建hbase 阅读详情

相关推荐

HBASE SHELL实践

=================================================================== 3. 接下来测试运行HBase。第一步:首先登陆ssh,之前设置了无密码登陆,因此这里不需要密码;再切换目录至/usr/local/hadoop ;再启动hadoop,如果已经启动hadoop请跳过此步骤。命令如下: ssh localhost cd /us...

Sing___546的博客 742

hbase开启,shell命令实战

hadoop@dblab-VirtualBox:~$ source /etc/profile hadoop@dblab-VirtualBox:~$ echo $HBASE_HOME /usr/local/hbase hadoop@dblab-VirtualBox:~$ start-hbase.sh localhost: starting zookeeper, logging to /usr/local/hbase/bin/../logs/hbase-hadoop-zookeeper-dblab-Virtua

viviliving的专栏 1579

Hbase shell命令的使用

本实验任务主要完成基于ubuntu环境掌握Hbase shell命令的使用的工作。通过完成本实验任务,要求学生熟练掌握Hbase shell命令的使用的方法,为后续实验的开展奠定Hbase平台基础,也为从事大数据平台运维工程师、大数据技术支持工程师等岗位工作奠定夯实的技能基础。1、掌握Hbase shell命令的使用Ubuntu(三台节点:mater,slave1,slave2)、Hadoop2.7.3、Zookeeper3.4.5、Hbase1.2.6Hbase是一个分布式的、面向列的开源数据库,该技术来

需要远程指导仿真实验、代码有问题的,请后台私信或者关注公众号 4156

Hbase常用命令速查

前言 以下命令在hbase1.2.1版本下试验通过。 记录常用hbase命令提高工作效率 常用命令 使用命令操作时,需要对表名列名带上单引号,否则会被hbase认为是一个变量,会报如下错误: NameError: undefined local variable or method `main2’ for Object:0x44b21f9f&amp;gt; 查看安装版本 version...

独行侠梦的博客 667

搭建适用于lammps中opls-aa力场的文件流程

现在我已经解决了以上问题,并且通过我的方法可以实现从空白文档到搭建完成以上全部内容,后期只要细心检查即可。需要的data文件最关键是获得相应阴阳离子的mmol文件,因此问题转化为构建一份mmol文件。主要用到的软件及程序:gaussian09,makemol程序(tranal),opls-aa的参数文件。二面角个数:成角原子序号及对应的参数(这里PF6的结构没有二面角,所以为0)参考文献个数:文献名(空够行数即可,这些是给自己的备忘))和自身体系对应的参考文献,修改或填入对应的参数即可。

baguette的博客 2888

CMOS锁相环核心:四种鉴频鉴相器(PFD)结构深度剖析与选型指南

本文深入剖析了CMOS锁相环中四种鉴频鉴相器(PFD)的结构与性能,包括传统RS触发器型、非时钟型、预充电型和边沿触发型PFD。通过详细的电路分析、实测数据和工程案例,提供了PFD选型的实用指南,帮助工程师根据速度、功耗和精度需求选择最优方案,提升锁相环设计效率。

weixin_42530458的博客 588

nameerror:_修复Ruby“ NameError:未定义的本地变量”错误

nameerror: InRuby, you don't have to declare variables, but you do have to assign something to them before they can be referred to. 在Ruby中 ,不必声明变量,但必须先给它们分配一些内容,然后才能对其进行引用。 If you're referring to...

cumao2792的博客 3279

STM32duino LSM6DSO驱动库:低功耗IMU工程化实践

惯性测量单元(IMU)是智能终端与工业设备实现运动感知的核心传感器,其性能关键在于数据精度、实时响应与系统功耗的协同优化。LSM6DSO作为集成加速度计与陀螺仪的六轴MEMS器件,依托片上有限状态机(FSM)和机器学习核心(MLC),支持自由落体检测、计步器、6D方向识别等硬件自治功能,显著降低主控CPU负载。在STM32平台下,通过深度耦合HAL/LL库、显式引脚管理、DMA加速SPI传输及EXTI中断协同,可实现亚毫秒级事件响应与微安级待机功耗。本文聚焦STM32duino生态中LSM6DSO驱动的工程

weixin_36304957的博客 552

关闭Hbase出现stoping hbase...........

博主是什么时候出现这个问题的呢,是在执行这条语句的时候:bin/stop-hbase.sh 出现这个问题的时候,是因为你的Hbase有问题,例如:什么东西没卸载干净,或者是把一些重要的文件卸载掉了,这个时候你就需要中断这个命令ctrl+v中断命令。 中断之后,选择强制关闭hmaster 执行下面这条语句即可: ...

weixin_42369418的博客 1769

Windows 2012 SYSVOL复制失败的处理

题外话:晓原理、知架构、查日志是排错的三件法宝今天在DC1上新建并链接了一个组策略对像,在客户端刷新时,却报下面的错误:“处理组策略失败。Windows无法应用组策略对象LDAP….”如下图所示:于是在客户端用\\domain.com访问,发现\\domain.com\SYSVOL\domain.com\policies下面没有上面报错的组策略对象。这是怎么一回事呢,pin...

weixin_33989780的博客 1669

Simulink仿真入门到精通(三) Simulink信号

本系列教程是根据孙忠潇编著的<<Simulink仿真及代码生成技术入门到精通>>学习笔记。 目录 Simulink仿真入门到精通(一) Simulink界面介绍 Simulink仿真入门到精通(二) Simulink模块 Simulink仿真入门到精通(三) Simulink信号 Simulink仿真入门到精通(四) Simulink子系统 Simulink仿真入门到精通(五) Simulink模型的仿真 Simulink仿真入门到精通(六) Simulink模型保存为图片 Sim

king110108的专栏 5397

HBase for centos 7(新手上路)

1、下载  http://archive.apache.org/dist/hbase/  2、这是我的安装路径 /opt/modules3、解压[root@localhost modules]# tar -zxvf hbase-2.0.0-bin.tar.gz 4、加入环境变量,cd命令 到conf文件下      然后编辑hbase-env.sh文件 配置JAVA_HOME[root@loca...

YlanHds的博客 625

【Docker】一招解决超时镜像超时报错:`ERROR: Get https://registry-1.docker.io/v2/`

Docker 镜像拉取超时或失败并不是 Docker 本身的缺陷,而是网络环境和默认配置在特定场景下的限制所导致的结果。通过本文的分析可以看到,问题的核心往往集中在三个方面:网络访问延迟、DNS 解析速度以及客户端默认超时时间。针对这些问题,最直接、有效的做法是使用国内镜像加速器,这不仅能够显著提升拉取速度,还能保证在企业内网或家庭网络中更加稳定

博客 1028

HBase Shell

HBase Shell命令

qq_51180928的博客 2054

Unity之如何实现TTS文本转语音(真人发音)

微软Azure TTS 文本转语音 服务 将文本转换为逼真的语音的语音服务功能 支持个各国语言,各种中文各种方言,支持不同音色男音女音 支持离线和在线版本

TxNet 5481

ARFoundation系列讲解 - 手部跟踪编程

通过使用ARFoundation的手部跟踪子系统,我们可以轻松地在AR应用程序中实现与用户手部的交互。通过设置AR环境、创建场景和相机、添加手部跟踪功能以及编写相应的脚本,我们可以开始在AR场景中跟踪和操作用户的手部。在Unity中创建一个新场景,并将AR Session组件添加到场景中的一个空对象上。手部跟踪的具体实现可能因AR设备和平台的不同而有所差异,你可能需要根据你的使用情况进行一些适配和调整。当你将手部放入AR场景中时,手部跟踪系统将触发相应的事件,并调用脚本中的回调函数。

2301_79325339的博客 358

HBase Shell命令大全

HBase关键名称: Row Key 列族 column family 单元 Cell 时间戳 timestamp HBase Shell 是官方提供的一组命令,用于操作HBase。如果配置了HBase的环境变量了,就可以知己在命令行中输入hbase shell 命令进入命令行。 hbase shell help命令 可以通过 help '命名名称'来查看命令行的具体使用 查询服务器状态st...

人不风流枉少年 14万+

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

HBASE Shell

hbase提供了一个shell的终端给用户交互 名称 命令表达式 创建表 create '表名称', '列族名称1','列族名称2','列族名称N' 添加记录      put '表名称', '行名称', '列名称:', '值' 查看记录 get '表名称', '行名称'

大数据 917

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

HBASE SHELL学习

HBASE SHELL学习

2301_77836489的博客 1820

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

hbase shell 练习

参考: 1. http://wiki.apache.org/hadoop/Hbase/Shell 2. http://uestzengting.iteye.com/blog/1140175 3. http://blog.youkuaiyun.com/hguisu/article/details/7244413 HBASE SHELL 常用命令 . 说明:新版hbase取消了对HQ

ChallenChenZhiPeng的专栏 1562

hbase shell 查看列名_HBase Shell命令

【hbase shell命令】进入命令行:hbase shell查看所有表:list查询表:scan "库名:表名",{LIMIT => 10}举例:scan "COSCP:TAG_CUST_BASE",{LIMIT => 10}查询表全部数据:scan '库名:表名'查询某一字段:get 'COSCP:TAG_CUST_BASE','9c97df04c75c7741c2a7f753b...

weixin_39848998的博客 4669

HBase 部署及shell操作

HBase 部署及shell操作

slb190623的博客 1942

HBase Shell命令

HBase包含可以与HBase进行通信的Shell。 HBase使用Hadoop文件系统来存储数据。所有这些任务发生在HDFS。下面给出的是一些由 常用的HBase Shell命令。 数据操纵语言 命令 说明 命令表达式 create 创建一个表 create '表名称', '列名称1','列名称2','列名称N' put 添加记录 put '表名称...

常年被追砍的博客 279

【hdfs】【hBase】【大数据技术基础】 作业二 HBase shell命令

业2 hbase-shell命令 一、运行HBase 1.启动hadoop 首先登陆ssh,之前设置了无密码登陆,因此这里不需要密码; 再切换目录至/usr/local/hadoop ; 再启动hadoop,如果已经启动hadoop请跳过此步骤。 命令如下: ssh localhost cd /usr/local/hadoop ./sbin/start-dfs.sh 2.验证hadoop是否启动 输入命令jps 能看到NameNode,DataNode和SecondaryNameNode都已经成功启动

Kika写代码的博客 1440

Hbase基础(二)——Hbase Shell

本篇文章主要讲述Hbase Shell的基本操作,如通用操作、DDL操作、DML操作,使读者能够对于Hbase Shell有基本的认识。

weixin_63507910的博客 628
上一篇: hbase shell删除键不听使唤,删除的是光标后面
下一篇: get
王树民
博客等级 码龄10年 912粉丝 560原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值