zoukankan      html  css  js  c++  java
  • Ubuntu上的Hbase集群搭建

    解压:

    tar -zxvf /home/hadoop/桌面/hbase-2.2.6-bin.tar.gz

    移动位置并改名:

    su
    mv /home/hadoop/hbase-2.2.6 /usr/local/Hbase
    更新文件夹所有者
    cd /usr/local/
    chown -R hadoop:hadoop ./Hbase

    配置环境:

    复制代码
    echo "export PATH=/usr/local/Hbase/bin:$PATH" >> /etc/bash.bashrc
    echo "export HBASE_HOME=/usr/local/Hbase" >> /etc/bash.bashrc source /etc/bash.bashrc exit cd /usr/local/Hbase/ echo "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/" >> conf/hbase-env.sh cd ~ sudo vim /etc/profile
    复制代码

    在profile的末尾添加

    export HBASE_HOME=usr/local/Hbase
    export PATH=$HBASE_HOME/bin:$PATH

    修改配置文件:

    cd /usr/local/Hbase/conf
    vim hbase-env.sh

    最下面的两行应该是:(前面如果配置了环境应该是只有第一行,那么只需要加入第二行就行了)

    export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
    export HBASE_MANAGES_ZK=false

    保存退出

    vim hbase-site.xml

    修改如下:

    复制代码
    <configuration>
      <!--
        The following properties are set for running HBase as a single process on a
        developer workstation. With this configuration, HBase is running in
        "stand-alone" mode and without a distributed file system. In this mode, and
        without further configuration, HBase and ZooKeeper data are stored on the
        local filesystem, in a path under the value configured for `hbase.tmp.dir`.
        This value is overridden from its default value of `/tmp` because many
        systems clean `/tmp` on a regular basis. Instead, it points to a path within
        this HBase installation directory.
    
        Running against the `LocalFileSystem`, as opposed to a distributed
        filesystem, runs the risk of data integrity issues and data loss. Normally
        HBase will refuse to run in such an environment. Setting
        `hbase.unsafe.stream.capability.enforce` to `false` overrides this behavior,
        permitting operation. This configuration is for the developer workstation
        only and __should not be used in production!__
    
        See also https://hbase.apache.org/book.html#standalone_dist
      -->
      <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
      </property>
      <property>
         <!-- 指定 hbase 在 HDFS 上的存储位置 -->
        <name>hbase.rootdir</name>
        <value>hdfs://master:9000/hbase</value>
      </property>
        <property>
            <!-- 指定 zookeeper 的地址-->
            <name>hbase.zookeeper.quorum</name>
            <value>master:2181,slave1:2181,slave2:2181,slave3:2181</value>
        </property>
      <property>
        <name>hbase.tmp.dir</name>
        <value>./tmp</value>
      </property>
      <property>
        <name>hbase.unsafe.stream.capability.enforce</name>
        <value>false</value>
      </property>
    </configuration>
    复制代码

    保存退出

  • 相关阅读:
    站点目录中的文件夹被删除后,应用程序池被重启
    silverlight中UserControl的属性在xaml文件中敲不出来的问题
    提取自Discuz NT 的验证码生成
    Asp.net首页生成静态页的一个比较好的方法
    asp.net 字符串格式化
    阻止用户关闭网页,提示保存的解决方案IE/FF/OP通用(未经测试)
    .NET程序如何防止被注入(整站)
    好久没有进步了
    C#数组排序
    我的静态页面
  • 原文地址:https://www.cnblogs.com/studya/p/14204073.html
Copyright © 2011-2022 走看看