理解HBase在Hadoop体系结构中的角色,熟练使用HBase操作常用的Shell命令,熟悉HBase操作常用的Java API。
计算机:CPU四核i7 6700处理器;内存8G; SATA硬盘2TB硬盘; Intel芯片主板;集成声卡、千兆网卡、显卡; 20寸液晶显示器。 编译环境:(1)操作系统:Linux (2)Hadoop版本:2.7.2 机器:虚拟机3台 (3)HBase版本:1.6.0(4)Eclipse 4.7
3.2进入hbase1.2.6,启动 ./bin/hbase shell,建表,插数据。
cd /opt/module/hbase-1.2.6/ cd bin Hbase shell hbase(main):004:0> create 'student','info' 0 row(s) in 2.8580 seconds => Hbase::Table - student hbase(main):005:0> put'student','1001','info:sex','male' 0 row(s) in 0.2920 seconds hbase(main):002:0> put 'student','1001','info:age','18' 0 row(s) in 0.6410 seconds hbase(main):003:0> put'student','1002','info:name','Janna' 0 row(s) in 0.0210 seconds hbase(main):004:0> put'student','1002','info:sex','female' 0 row(s) in 0.0840 seconds hbase(main):005:0> put 'student','1002','info:age','20' 0 row(s) in 0.0830 seconds