1. 介绍
2. 安装
进入官网下载最新版本:http:// hbase.apache.org/
下载
#直接下载安装: $ mkdir hbase-install $ cd hbase-install $ wget http://apache.claz.org/hbase/hbase-0.92.1/hbase-0.92.1.tar.gz $ tar xvfz hbase-0.92.1.tar.gz #####或手动安装 $ mkdir hbase-install $ mv hbase-0.94.20.tar.gz hbase-install/ $ cd hbase-install/ $ tar xvfz hbase-0.94.20.tar.gz x hbase-0.94.20/
配置及启动HBase服务器
$ export HBASE_HOME=`pwd`/hbase-0.94.20 $ $HBASE_HOME/bin/start-hbase.sh starting master, logging to /Users/klaus/Documents/study/java/bigdata/hbase-install/hbase-0.94.20/logs/hbase-klaus-master-klaus.local.out
启动后的管理页面截图
3. 简单使用
- 显示所有表 list
- 创建表 create 'table', 'column family'
- 往表里插入数据 put 'table name' , 'column' , 'key', 'value'
- 读取表数据 get 'table name', 'column'
- 读取表里所有数据 scan 'table name'
$ $HBASE_HOME/bin/hbase shell HBase Shell; enter 'help<RETURN>' for list of supported commands. Type "exit<RETURN>" to leave the HBase Shell Version 0.94.20, r09c60d770f2869ca315910ba0f9a5ee9797b1edc, Fri May 23 22:00:41 PDT 2014 hbase(main):001:0> list TABLE 2014-07-04 00:10:13.517 java[699:1003] Unable to load realm info from SCDynamicStore 0 row(s) in 0.4350 seconds hbase(main):002:0> creae 'mytable', 'cf' NoMethodError: undefined method `creae' for #<Object:0xffc7b3a> hbase(main):003:0> create 'mytable', 'cf' 0 row(s) in 5.1260 seconds hbase(main):004:0> list TABLE mytable 1 row(s) in 0.0190 seconds hbase(main):005:0> create 'mytable', 'cf' ERROR: Table already exists: mytable! Here is some help for this command: Create table; pass table name, a dictionary of specifications per column family, and optionally a dictionary of table configuration. Dictionaries are described below in the GENERAL NOTES section. Examples: hbase> create 't1', {NAME => 'f1', VERSIONS => 5} 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', 'f1', {SPLITS => ['10', '20', '30', '40']} hbase> create 't1', 'f1', {SPLITS_FILE => 'splits.txt'} hbase> # Optionally pre-split the table into NUMREGIONS, using hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname) hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'} hbase(main):006:0> create 'hello', 'hello' 0 row(s) in 1.0600 seconds hbase(main):007:0> list TABLE hello mytable 2 row(s) in 0.0220 seconds hbase(main):008:0> delete delete delete_snapshot deleteall hbase(main):008:0> delete hello NameError: undefined local variable or method `hello' for #<Object:0xffc7b3a> hbase(main):009:0> delete 'hello' ERROR: wrong number of arguments (1 for 3) Here is some help for this command: Put a delete cell value at specified table/row/column and optionally timestamp coordinates. Deletes must match the deleted cell's coordinates exactly. When scanning, a delete cell suppresses older versions. To delete a cell from 't1' at row 'r1' under column 'c1' marked with the time 'ts1', do: hbase> delete 't1', 'r1', 'c1', ts1 hbase(main):010:0> delete 'hello', 'hello' ERROR: wrong number of arguments (2 for 3) Here is some help for this command: Put a delete cell value at specified table/row/column and optionally timestamp coordinates. Deletes must match the deleted cell's coordinates exactly. When scanning, a delete cell suppresses older versions. To delete a cell from 't1' at row 'r1' under column 'c1' marked with the time 'ts1', do: hbase> delete 't1', 'r1', 'c1', ts1 hbase(main):011:0> put 'mytable', 'first', 'cf:message', 'hello HBase' 0 row(s) in 0.0730 seconds hbase(main):012:0> put 'mytable', 'second', 'cf:foo', 0x0 0 row(s) in 0.0200 seconds hbase(main):013:0> put 'mytable', 'third', 'cf:bar', 3.14159 0 row(s) in 0.0150 seconds hbase(main):014:0> get 'mytable', 'hello' COLUMN CELL 0 row(s) in 0.0210 seconds hbase(main):015:0> get 'mytable', 'cf:foo' COLUMN CELL 0 row(s) in 0.0040 seconds hbase(main):016:0> get 'mytable', 'first' COLUMN CELL cf:message timestamp=1404404100808, value=hello HBase 1 row(s) in 0.0140 seconds hbase(main):017:0> put 'mytable', 'first', 'cf:message', 'newvalue' 0 row(s) in 0.0160 seconds hbase(main):018:0> get 'mytable', 'first' COLUMN CELL cf:message timestamp=1404404364748, value=newvalue 1 row(s) in 0.0170 seconds hbase(main):019:0> scan 'mytable' ROW COLUMN+CELL first column=cf:message, timestamp=1404404364748, value=newvalue second column=cf:foo, timestamp=1404404148293, value=0 third column=cf:bar, timestamp=1404404164447, value=3.14159 3 row(s) in 0.0340 seconds hbase(main):020:0>
相关推荐
此外,Impala支持标准的SQL语法,使得具备SQL基础的用户能快速上手,无需学习新的查询语言。 在《Getting Started with Impala》中,读者将了解到如何安装和配置Impala,包括集群设置、节点管理以及资源调度。书中...
In addition, this gives streaming applications access to the wider ecosystem of Spark libraries including Spark SQL, MLlib, SparkR, and GraphX. Moreover, programmers can blend stream processing with ...
毕业设计-超人名片小程序2.0.3 原版-整站商业源码.zip
实训商业源码-135k代驾1.2.5 小程序前端+后端-论文模板.zip
毕业论文-小小素材库V7.8.43 原版 小程序前端+后端-整站商业源码.zip
内容概要:本文详细介绍了基于滑模控制(SMC)和H∞控制相结合的方法应用于永磁直线同步电机(PMLSM)的鲁棒控制。首先阐述了PMLSM的基本数学模型及其物理意义,包括d-q坐标系下的电压方程和运动方程。随后解释了滑模控制的工作原理,重点在于如何构建滑模面并确保系统沿此面稳定运行。接着讨论了H∞控制的目标——即使在不确定条件下也能保持良好的性能表现。文中还提供了具体的Matlab代码实例,展示了如何利用Matlab控制系统工具箱进行H∞控制器的设计。最后给出了一段完整的Matlab程序框架,演示了两种控制方法的具体实现方式。 适合人群:从事电机控制领域的研究人员和技术人员,尤其是那些想要深入了解滑模控制和H∞控制理论及其在实际工程中应用的人士。 使用场景及目标:适用于需要提高永磁直线同步电机控制系统抗干扰能力和鲁棒性的场合,如工业自动化生产线、精密加工设备等。通过学习本篇文章提供的理论知识和编程技巧,读者能够掌握这两种先进控制策略的应用方法,从而提升自身解决复杂控制问题的能力。 其他说明:文中所涉及的内容不仅限于理论讲解,还包括了大量的实战经验分享,有助于读者快速上手并在实践中不断改进自己的设计方案。同时鼓励读者积极尝试不同的参数配置,以便找到最适合特定应用场景的最佳解决方案。
嵌入式系统8ARM程序的调试分析解析.pptx
实训商业源码-付费阅读 5.2.5-论文模板.zip
实训商业源码-黄河·粉丝宝&任务宝V3 1.0.1-论文模板.zip
毕业设计-PandaPRO 去除域名授权限制-整站商业源码.zip
内容概要:本文详细介绍了基于多目标粒子群算法(MOPSO)的微电网优化运行模型。该模型涵盖了风机、光伏、柴油发电机及储能设备的调度策略,旨在最小化经济成本并最大化风光消纳。文中首先阐述了微电网优化运行的重要性和背景,接着具体描述了模型的构建过程,包括目标函数的选择和算法实现步骤。最后,通过实际微电网运行数据的实验与分析,验证了该方法的有效性和优越性。 适合人群:从事电力系统优化、智能电网研究的专业人士,尤其是对多目标粒子群算法感兴趣的科研人员和技术开发者。 使用场景及目标:适用于需要优化微电网运行的研究项目或工程实践中,帮助研究人员和工程师更好地理解和应用MOPSO算法,从而实现微电网的高效运行和资源优化配置。 其他说明:在实际应用时,需注意算法参数设置和数据预处理,以确保算法的稳定性和准确性。此外,还需根据具体情况对算法进行适当调整和优化,以提升优化效果。
内容概要:本文详细介绍了博世汽车电驱仿真模型,重点探讨了同步电机和异步电机模型的构建及其特性。文章首先简述了这两种电机的基本概念和应用场景,接着深入讲解了如何通过精确控制实现相电流的完美波形。此外,还讨论了自动计算弱磁模型并调用脚本进行FOC(场向量控制)的方法,确保在正反转切换时电流无波动。最后,文章分析了用于实现这些功能的代码和脚本,强调了MATLAB和C++等编程语言的作用。 适合人群:从事汽车电驱系统研究的技术人员、高校相关专业师生、对电驱仿真感兴趣的工程技术人员。 使用场景及目标:适用于希望深入了解同步与异步电机仿真模型、掌握相电流波形优化方法、学习弱磁FOC控制技术和提高电驱系统性能的研究人员和技术人员。 其他说明:文中提到的tc_ipmsm_config.m配置文件是仿真模型正常运行的关键,读者应在实践中注意加载该文件。同时,文章提供了丰富的理论背景和实用技巧,有助于读者在实际项目中应用所学知识。
实训商业源码-365全民帮扶V3.5.11 开源版-论文模板.zip
内容概要:本文详细探讨了无刷直流电机(BLDC)在无位置传感器控制下的启动特性和突加负载响应。文章首先介绍了启动阶段的大电流高转矩特性,展示了启动过程中电流尖峰现象及其原因。接着讨论了反电势观测器的设计与实现,特别是滑模观测器的应用,用于估算转子位置。此外,还深入讲解了速度环PI控制器的参数设置,确保系统在突加负载时能够快速恢复并保持稳定运行。最后提到了相位补偿的重要性以及其实现方法。 适合人群:对无刷直流电机控制系统感兴趣的工程师和技术人员,尤其是那些希望深入了解无位置传感器控制技术和MATLAB Simulink仿真的专业人士。 使用场景及目标:适用于需要优化BLDC电机性能的研究项目或工业应用,旨在提高系统的可靠性和效率,特别是在启动和负载变化的情况下。 其他说明:文中提供了具体的MATLAB代码片段,帮助读者更好地理解和实现相关算法。同时提醒了一些常见的陷阱和注意事项,有助于避免实际操作中的错误。
实训商业源码-红包锦鲤 1.0.8原版-论文模板.zip
实训商业源码-诚客-智慧学堂 1.4.22-论文模板.zip
实训商业源码-请柬喜帖邀请函1.4.5-论文模板.zip
毕业论文-五金器件类企业网站源码-整站商业源码.zip
毕业设计-付费阅读5.4.5 开源版-整站商业源码.zip