zoukankan      html  css  js  c++  java
  • HBASE使用详解 踏雪扬尘

    HBASE 安装启动

    vim hbase-site.xml

    <configuration>
    开启伪分布式
     <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
      </property>
    设置HBASE 数据的存储地址,必须修改之前默认是存储的本地盘
    <property>
      <name>hbase.rootdir</name>
      <value>hdfs://172.24.xx.xx:9000/hbase</value>
    </property>
    <property>
      <name>hbase.unsafe.stream.capability.enforce</name>
      <value>false</value>
    </property>
    ZK的地址,HBASE会将元数据存储在ZK 上
    <property>
            <name>hbase.zookeeper.quorum</name>
            <value>localhost</value>
        </property>
    </configuration>
    

    先停止 HBASE服务 bin/stop-hbase.sh
    JPS 正常启动进程包括 HMaster HRegionServer

    再重启HBASE服务 bin/start-hbase.sh

    故障分析

    ServerCrashProcedures=false. Master startup cannot progress, in holding-pattern until region onlined.
    master.HMaster: Master failed to complete initialization after 900000ms. Please consider submitting a bug report including a thread dump of this process.
    陆陆续续报上述错误,原因是新制作的HBASE和老版本不兼容解决手段如下:
    登录到 ZK shell客户端 rmr /hbase/meta-region-server 删除该元数据,重启HBASE 就解决了上述问题

    bin/hbase shell
    create 't1','cf'
    list 't1'
    describe 't1'
    put 't1', 'row1', 'cf:a', 'value1'
    put 't1', 'row2', 'cf:b', 'value2'
    scan 't1'

    get 't1','row1'

    disable 't1'
    enable 't1'

    drop 't1'

  • 相关阅读:
    python基础4
    python的基础数据类型和编码
    python的if语句和while循环
    java特殊运算符
    深入理解java集合
    python常用模块
    python函数的参数问题
    集合关系之间的运算
    集合
    可变类型与不可变类型
  • 原文地址:https://www.cnblogs.com/yyystar/p/15624145.html
Copyright © 2011-2022 走看看