zoukankan      html  css  js  c++  java
  • 《OD大数据实战》HBase环境搭建

    一、环境搭建

     1. 下载

    hbase-0.98.6-cdh5.3.6.tar.gz

    2. 解压

    tar -zxvf hbase-0.98.6-cdh5.3.6.tar.gz -C /opt/modules/cdh/

    3. 修改配置

    1)修改hbase-env.sh

    # The java implementation to use. Java 1.6 required.
    export JAVA_HOME=/opt/modules/jdk1.7.0_67
    
    # Extra Java CLASSPATH elements. Optional.
    export HBASE_CLASSPATH=/opt/modules/cdh/hadoop-2.5.0-cdh5.3.6/etc/hadoop

    # The directory where pid files are stored. /tmp by default.
    export HBASE_PID_DIR=/opt/modules/cdh/hbase-0.98.6-cdh5.3.6/pids

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

    2)修改regionservers

    beifeng-hadoop-02

    3)修改hbase-site.xml

    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
    <configuration>
      
      <property>
        <name>hbase.rootdir</name>
        <value>hdfs://beifeng-hadoop-02:9000/hbase</value>
      </property>
      
      <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
      </property>
      
      <property>
        <name>hbase.zookeeper.quorum</name>
        <value>beifeng-hadoop-02</value>
      </property>
      
        <property>
          <name>hbase.master.maxclockskew</name>
          <value>180000</value>
          <description>Time difference of regionserver from master</description>
        </property>
        
        <property>
          <name>hbase.tmp.dir</name>
          <value>/opt/modules/cdh/hbase-0.98.6-cdh5.3.6/tmp</value>
        </property>
      
    </configuration>

    4. 启动

    bin/start-hbase.sh

    5. 检查是否成功启动

    jps

    可以看到有两个进程 HMaster和HRegionServer

    6. 进入hbase命令行

    bin/hbase shell
  • 相关阅读:
    JS计算两个日期时间之差之天数不正确
    nodejs 第一天
    SQLSERVER存储过程基本语法
    复制表结构和数据SQL语句
    SVN使用教程总结
    jquery hover事件只触发一次动画
    导出格式
    C# 反射给对象赋值遇到的问题——类型转换
    a标签下载
    检测到在集成的托管管道模式下不适用的 ASP.NET 设置。
  • 原文地址:https://www.cnblogs.com/yeahwell/p/5757446.html
Copyright © 2011-2022 走看看