分布式数据库 HBase

57课时
1.8K学过
8分

课程评价 (0)

请对课程作出评价:
0/300

学员评价

暂无精选评价
5分钟

配置hbase-site.xml

先在hbase-site.xml中加一个属性hbase.cluster.distributed,设置为true,然后把 hbase.rootdir 设置为HDFS的NameNode的位置。例如,namenode运行在namenode. example.org,端口是9000,假如所期望的目录是/hbase,则使用如下的配置方法。

//--hbase-site.xml配置文件--//
<configuration>
  ...
#hbase.rootdir 设置为HDFS的NameNode的位置
  <property>
    <name>hbase.rootdir</name>
    <value>hdfs://namenode.example.org:9000/hbase</value>
    <description>The directory shared by RegionServers.
    </description>
  </property>

#加一个属性hbase.cluster.distributed 设置为 true  
<property>
    <name>hbase.cluster.distributed</name>
    <value>true</value>
    <description>The mode the cluster will be in. Possible values are
      false: standalone and pseudo-distributed setups with managed Zookeeper
      true: fully-distributed with unmanaged Zookeeper Quorum (see hbase-env.sh)
    </description>
  </property>
  ...
</configuration>