HBase学习

参考文章:http://hbase.apache.org/book.html#quickstart

Procedure: Download, Configure, and Start HBase in Standalone Mode

下载文件(下载链接见参考文档):
hbase-1.1.12-bin.tar.gz
jdk-8u144-linux-x64.tar.gz

  • 解压文件,并且配置jdk
tar xzvf hbase-1.1.12-bin.tar.gz -C /usr/hbase/
cd /usr/hbase/hbase-1.1.12/

echo "export JAVA_HOME=/usr/jdk64/jdk1.8.0_144/" >> conf/hbase-env.sh 
  • 配置Hbase使用本地文件系统存储数据
    注意:/hbase/hbase-data目录不需要手动创建。/hbase/zookeeper目录需要手动创建
[root@test hbase-1.1.12]# cat conf/hbase-site.xml 

  
    hbase.rootdir
    file:////hbase/hbase-data
  
  
    hbase.zookeeper.property.dataDir
    /hbase/zookeeper
  

  • 启动hbase
[root@test hbase-1.1.12]# bin/start-hbase.sh 
starting master, logging to /usr/hbase/hbase-1.1.12/bin/../logs/hbase-root-master-test.out
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
  • 使用jps检查HMaster
[root@test hbase-1.1.12]# /usr/jdk64/jdk1.8.0_144/bin/jps 
12482 SecondaryNameNode
868 HMaster
12309 DataNode
12182 NameNode
1165 Jps

Procedure: Use HBase For the First Time

见参考文章http://hbase.apache.org/book.html#quickstart
进一步练习见文章:http://blog.csdn.net/scutshuxue/article/details/6988348
导入csv数据的练习参考文章:http://blog.csdn.net/scgaliguodong123_/article/details/46771929

你可能感兴趣的:(HBase学习)