Hadoop教程
HBase
Hive
Pig
Sqoop
Spark

HBase 安装

HBase安装的先决条件是在Linux机器上安装Java和Hadoop。
Hbase可以三种方式安装: 独立,伪分布式模式和完全分布式模式。
从 http://www.interior-dsgn.com/apache/hbase/stable/下载Hbase软件包,并使用以下文件解压缩命令。
$cd usr/local/$wget http://www.interior-dsgn.com/apache/hbase/stable/hbase-0.98.8-hadoop2-bin.tar.gz
$tar-zxvf hbase-0.98.8-hadoop2-bin.tar.gz
以超级用户身份登录,如下所示
$su
$password: enter your password here
mv hbase-0.99.1/* Hbase/

以独立模式配置HBase

设置HBase的Java主页并从conf文件夹中打开hbase-env.sh文件。编辑JAVA_HOME环境变量,并将现有路径更改为当前JAVA_HOME变量,如下所示。
cd /usr/local/Hbase/conf
gedit hbase-env.sh
将现有的JAVA_HOME值替换为您的当前值,如下所示。
export JAVA_HOME=/usr/lib/jvm/java-1.7.0
在/usr/local/Hbase中,您将找到hbase-site.xml。打开它,并在配置中添加以下代码。
<configuration>
   //Here you have to set the path where you want HBase to store its files.
<property>
<name>hbase.rootdir</name>
<value>file:/home/hadoop/HBase/HFiles</value>
</property>
    
   //Here you have to set the path where you want HBase to store its built in zookeeper  files.
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/hadoop/zookeeper</value>
</property>
</configuration>
现在,通过运行Hbase的bin文件夹中的start-hbase.sh来启动Hbase。
$cd /usr/local/HBase/bin
$./start-hbase.sh
Cloudera VM,因为它已预安装了Hbase。
启动Hbase: 在终端中键入Hbase shell以启动hbase。
昵称: 邮箱:
Copyright © 2022 立地货 All Rights Reserved.
备案号:京ICP备14037608号-4