zoukankan      html  css  js  c++  java
  • HBase(二)——搭建Standalone HBase

    HBase搭建--Standalone HBase

    1、搭建方式说明

    	the setup of a single-node standalone HBase. A standalone instance has all
    HBase daemons — the Master, RegionServers, and ZooKeeper — running in a single JVM persisting to the local filesystem.
    

    2、搭建步骤

    1、虚拟机中必须安装JDK,JDK的版本建议使用1.8(如果已经安装了,忽略此步骤)

    2、在官网中下载HBase对应的安装包,此次课程使用2.0.5版本

    3、理论上可以将HBase上传到任意一台虚拟机,但是因为HBase需要zookeeper担任分布式协作服务的角色,而HBase的安装包中包含了zookeeper,而我们在开启虚拟机之后,一般会将高可用的Hadoop集群准备好,因此集群中已经包含zookeeper的服务,因此,建议将单节点的HBase配置在没有安装zookeeper的节点上

    4、解压hbase安装包

    tar xzvf hbase-2.0.5-bin.tar.gz -C /opt/bigdata
    cd hbase-2.0.5/
    

    5、在/etc/profile文件中配置HBase的环境变量

    export HBASE_HOME=/opt/bigdata/hbase-2.0.5
    将$HBASE_HOME设置到PATH路径中
    

    6、进入到/opt/bigdata/hbase-2.0.5/conf目录中,在hbase-env.sh文件中添加JAVA_HOME

    JAVA_HOME=/usr/java/jdk1.8.0_181-amd64
    

    7、进入到/opt/bigdata/hbase-2.0.5/conf目录中,在hbase-site.xml文件中添加hbase相关属性

    <configuration>
      <property>
        <name>hbase.rootdir</name>
        <value>file:///home/testuser/hbase</value>
      </property>
      <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/home/testuser/zookeeper</value>
      </property>
      <property>
        <name>hbase.unsafe.stream.capability.enforce</name>
        <value>false</value>
        <description>
          Controls whether HBase will check for stream capabilities (hflush/hsync).
    
          Disable this if you intend to run on LocalFileSystem, denoted by a rootdir
          with the 'file://' scheme, but be mindful of the NOTE below.
    
          WARNING: Setting this to false blinds you to potential data loss and
          inconsistent system state in the event of process and/or node failures. If
          HBase is complaining of an inability to use hsync or hflush it's most
          likely not a false positive.
        </description>
      </property>
    </configuration>
    

    8、在任意目录下运行hbase shell的命令,进入hbase的命令行进行相关操作。

  • 相关阅读:
    python面试题解析(python基础篇80题)
    python面试题
    网络IO模型 主要 IO多路复用
    线程队列 线程池 协程
    线程的Thread模块 同步控制:锁,事件,信号量,条件,定时器
    进程池,线程的理论,Threading.Thread来创建线程
    进程之间的通信(IPC),对列,管道,数据共享.进程池初识
    Process 进程之间的数据隔离问题,守护进程,锁,信号量,事件
    js get the local domain and path fast
    github jekyll blog
  • 原文地址:https://www.cnblogs.com/littlepage/p/11293828.html
Copyright © 2011-2022 走看看