zoukankan      html  css  js  c++  java
  • Hbase安装

    一、HBASE本地模式:
    1、首先安装hadoop、jdk
    2、导入hbase-1.2.5-bin.tar.gz包
    3、解压:tar -zxvf hbase-1.2.5-bin.tar.gz
    4、配置环境变量

    进入/etc/profile
    export HBASE_HOME=/yang/hbase-1.2.5
    export PATH=$PATH:$HBASE_HOME/bin

    5、source /etc/profile生效
    6、配置java——home

    进入hbase-1.2.5/conf/hbase-env.sh
    export JAVA_HOME=/mnt/sata1/jdk1.8.0_111

    7、进入hbase-1.2.5/conf/hbase-site.xml添加

    <configuration>
      <property>
        <name>hbase.rootdir</name>
        <value>hdfs://yang/hbaseData</value>
      </property>
      <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/yang/zookeeper</value>
      </property>
    </configuration>

    解释: hbase.rootdir:hbase的相关的内容(数据)存储在什么位置
    hbase.zookeeper.property.dataDir:zookeeper有一个节点(数据)应该存储在什么位置。因为默认是存储在/tmp目录下
    zookeeper本身是一个独立的组件,在hbase中将zookeeper进行了默认集成,所以不需要单独安装zookeeper。在全分布式的模式下,
    建议搭建zookeeper的集群

    8、启动
    /bin/start-hbase.sh
    只有多一个Hmaster节点
    进入shell窗口:hbase shell

    二、Hbase伪分布式安装:
    将数据文件存储到hdfs中
    进入hbase-1.2.5/conf/hbase-site.xml修改为:

    <configuration>
      <property>
        <name>hbase.rootdir</name>
        <value>hdfs://localhost:9000/hbase</value>
      </property>
      <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/yang/zookeeper</value>
      </property>
      <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
      </property>
    </configuration>
  • 相关阅读:
    基于element-ui图片封装组件
    计算时间间隔具体每一天
    C语言学习笔记 —— 函数作为参数
    AtCoder Beginner Contest 049 题解
    AtCoder Beginner Contest 048 题解
    AtCoder Beginner Contest 047 题解
    AtCoder Beginner Contest 046 题解
    AtCoder Beginner Contest 045 题解
    AtCoder Beginner Contest 044 题解
    AtCoder Beginner Contest 043 题解
  • 原文地址:https://www.cnblogs.com/yfb918/p/10594893.html
Copyright © 2011-2022 走看看