5分钟
编辑{HBASE_HOME}/conf/hbase-site.xml
确认HDFS安装成功之后,就可以先编辑conf/hbase-site.xml。在这个文件中可以加入自己的配置,但会覆盖Section 3.1.1配置、“HBase默认配置”、Section 1.3.2.2.2.3配置、“HDFS客户端配置”。运行HBase需要设置hbase.rootdir属性,该属性指HBase HDFS中使用的目录的位置。例如,要想让namenode监听locahost的9000端口。可以在hbase-site.xml中写入如下内容。
//--hbase-site.xml配置文件--//
<configuration>
...
#可以加入自己的配置
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:9000/hbase</value>
<description>The directory shared by RegionServers.
</description>
</property>
#可以加入自己的配置
<property>
<name>dfs.replication</name>
<value>true</value>
</property>
...
</configuration>
学员评价