Mac 安装 Hbase

1. 用brew来安装

brew install hbase

2. Hbase 配置

hbase-env.sh

#export JAVA_HOME="$(/usr/libexec/java_home --version 1.8)"
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home


export HBASE_OPTS="-Djava.net.preferIPv4Stack=true -XX:+UseConcMarkSweepGC"

# Configure PermSize. Only needed in JDK7. You can safely remove it for JDK8+
export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS"
export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS"



# Where log files are stored.  $HBASE_HOME/logs by default.
export HBASE_LOG_DIR="${HBASE_LOG_DIR:-/usr/local/var/log/hbase}"


# Tell HBase whether it should manage it's own instance of Zookeeper or not.
export HBASE_MANAGES_ZK=false

hbase-site.xml

 

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<configuration>
  <property>
    <name>hbase.rootdir</name>
    <value>hdfs://localhost:9000/hbase</value>
  </property>
  <property>
    <name>hbase.cluster.distributed</name>
  <value>false</value>
</property>
  <property>
    <name>hbase.zookeeper.property.clientPort</name>
    <value>2181</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/usr/local/var/zookeeper</value>
  </property>
  <property>
    <name>hbase.zookeeper.dns.interface</name>
    <value>lo0</value>
  </property>
  <property>
    <name>hbase.regionserver.dns.interface</name>
    <value>lo0</value>
  </property>
  <property>
    <name>hbase.master.dns.interface</name>
    <value>lo0</value>
  </property>

</configuration>

3. 启动 Hbase

libexec/bin 下执行

start-hbase.sh

http://www.waitingfy.com/archives/4021

4021

Leave a Reply

Name and Email Address are required fields.
Your email will not be published or shared with third parties.