zoukankan      html  css  js  c++  java
  • HBase0.90.4集群安装配置总结说明

    1、出现版本不一致错误

    如果启动时出现版本不一致的错误,如下所示:
    2012-01-06 21:27:18,384 FATAL org.apache.Hadoop.hbase.master.HMaster: Unhandled exception. Starting shutdown.
    org.apache.Hadoop.ipc.RemoteException: Server IPC version 5 cannot communicate with client version 3
    at org.apache.Hadoop.ipc.Client.call(Client.java:740)
    at org.apache.Hadoop.ipc.RPC$Invoker.invoke(RPC.java:220)
    at $Proxy5.getProtocolVersion(Unknown Source)
    at org.apache.Hadoop.ipc.RPC.getProxy(RPC.java:359)
    at org.apache.Hadoop.hdfs.DFSClient.createRPCNamenode(DFSClient.java:113)
    at org.apache.Hadoop.hdfs.DFSClient. (DFSClient.java:215)
    at org.apache.Hadoop.hdfs.DFSClient. (DFSClient.java:177)
    at org.apache.Hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:82)
    at org.apache.Hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1378)
    at org.apache.Hadoop.fs.FileSystem.access$200(FileSystem.java:66)
    at org.apache.Hadoop.fs.FileSystem$Cache.get(FileSystem.java:1390)
    at org.apache.Hadoop.fs.FileSystem.get(FileSystem.java:196)
    at org.apache.Hadoop.fs.Path.getFileSystem(Path.java:175)
    at org.apache.Hadoop.hbase.util.FSUtils.getRootDir(FSUtils.java:364)
    at org.apache.Hadoop.hbase.master.MasterFileSystem. (MasterFileSystem.java:81)
    at org.apache.Hadoop.hbase.master.HMaster.finishInitialization(HMaster.java:346)
    at org.apache.Hadoop.hbase.master.HMaster.run(HMaster.java:282)
    2012-01-02 21:27:18,384 INFO org.apache.Hadoop.hbase.master.HMaster: Aborting
    这就是说明Hadoop和HBase版本不匹配,仔细阅读文档,你会在http://hbase.apache.org/book.html#hadoop发现,解释如下所示:
    Because HBase depends on Hadoop, it bundles an instance of the Hadoop jar under its lib directory. The bundled jar is ONLY

    for use in standalone mode. In
    distributed mode, it is critical that the version of Hadoop that is out on your cluster match what is under HBase. Replace the hadoop jar found in the HBase lib
    directory with the Hadoop jar you are running on your cluster to avoid version mismatch issues. Make sure you replace the jar in HBase everywhere on your cluster.
    Hadoop version mismatch issues have various manifestations but often all looks like its hung up.
    将HBase解压缩包中lib的Hadoop Core jar文件替换为当前你所使用的Hadoop版本即可。

    2、HBase集群启动以后,执行相关操作时抛出异常

    如果HBase集群正常启动,但是在想要创建一个table的时候,出现如下异常,如下所示:
    ERROR: org.apache.Hadoop.hbase.NotAllMetaRegionsOnlineException: org.apache.hadoop.hbase.NotAllMetaRegionsOnlineException: Timed out (10000ms)
    at org.apache.Hadoop.hbase.catalog.CatalogTracker.waitForMeta(CatalogTracker.java:334)
    at org.apache.Hadoop.hbase.master.HMaster.createTable(HMaster.java:769)
    at org.apache.Hadoop.hbase.master.HMaster.createTable(HMaster.java:743)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.Hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
    at org.apache.Hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
    解决方法就是,修改/etc/hosts文件,修改内容以master为例,如下所示:

    #127.0.0.1 localhost
    192.168.0.180 master
    192.168.0.191 slave-01
    192.168.0.190 slave-02
    192.168.0.189 slave-03
    # The following lines are desirable for IPv6 capable hosts
    #::1 ip6-localhost ip6-loopback
    #fe00::0 ip6-localnet
    #ff00::0 ip6-mcastprefix
    #ff02::1 ip6-allnodes
    #ff02::2 ip6-allrouters
    然后,再进行相关操作就没有问题了。

  • 相关阅读:
    洛谷 P1074 靶形数独 Label:search 不会
    TYVJ P3522 &&洛谷 P1135 奇怪的电梯 Label:bfs
    洛谷 P1160 队列安排 Label:链表 数据结构
    uestc 1073 秋实大哥与线段树 Label:线段树
    TYVJ P3407 佳佳的魔法照片 Label:语文很重要 语文很重要 语文很重要
    TYVJ P1103 多项式输出 Label:模拟 有点儿坑
    A+B Problem 详细解答 (转载)
    如何批量修改文件名
    c++ 在windows下获取时间和计算时间差的几种方法总结
    SQL Server 2008在Windows 10上不支持
  • 原文地址:https://www.cnblogs.com/powerxu/p/2496808.html
Copyright © 2011-2022 走看看