【问题标题】:New HBase installation very slow新的 HBase 安装速度很慢
【发布时间】:2012-10-20 04:47:10
【问题描述】:

我刚刚在 iMac 上安装了 HBase 0.94.2,运行 Sun Java 7 和 Mac OS 10.8.2。

我确实有一个开发 Hadoop 实例,但是现在我在独立模式下运行 HBase。

很遗憾,许多基本操作的执行时间超过 30 秒:

magoo:bin mattpainter$ ./hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.94.2, r1395367, Sun Oct  7 19:11:01 UTC 2012

hbase(main):002:0> list 'table'
TABLE                                                                                                                                                                       
2012-10-20 08:26:38.903 java[41217:1703] Unable to load realm info from SCDynamicStore
0 row(s) in 33.6460 seconds

hbase(main):003:0> 

查看日志,我们看到:

12/10/20 08:24:58 INFO zookeeper.ClientCnxn: Client session timed out, have not heard from server in 26667ms for sessionid 0x13a7a7744270005, closing socket connection and attempting reconnect
12/10/20 08:24:58 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
12/10/20 08:24:58 INFO util.RetryCounter: Sleeping 2000ms before retry #1...
12/10/20 08:24:59 INFO zookeeper.ClientCnxn: Opening socket connection to server /fe80:0:0:0:0:0:0:1%1:2181
12/10/20 08:25:04 INFO client.ZooKeeperSaslClient: Client will not SASL-authenticate because the default JAAS configuration section 'Client' could not be found. If you are not using SASL, you may ignore this. On the other hand, if you expected SASL to work, please fix your JAAS configuration.
12/10/20 08:25:04 INFO zookeeper.ClientCnxn: Socket connection established to fe80:0:0:0:0:0:0:1%1/fe80:0:0:0:0:0:0:1%1:2181, initiating session
12/10/20 08:25:04 INFO zookeeper.ClientCnxn: Session establishment complete on server fe80:0:0:0:0:0:0:1%1/fe80:0:0:0:0:0:0:1%1:2181, sessionid = 0x13a7a7744270005, negotiated timeout = 40000

有什么问题会导致零配置的开箱即用安装(除了在hbase-env.sh 中设置JAVA_HOME)会出现这种行为?

非常感谢, 马特

【问题讨论】:

标签: hbase apache-zookeeper


【解决方案1】:

是的,ZOOKEEPER-1477 确实是罪魁祸首。

我从 JDK1.7.0_04 升级到 JDK1.7.0_09,相应地修改了我的 base-env.sh,现在一切都可以顺利运行了。

【讨论】:

    【解决方案2】:

    您的 JVM 似乎默认使用 IPv6 流量。尝试将 -Djava.net.preferIPv4Stack=true 添加到您的 HBASE_OPTS envvar(仅在 hbase-env.sh 中的 JAVA_HOME 下面几行),然后重新启动 HBase。

    还有其他强制 IPv4 的方法(编辑 sysctl.conf)

    【讨论】:

    • 谢谢你 - 这似乎并没有解决问题,但升级我的 JDK 几个档次。好奇。
    猜你喜欢
    • 1970-01-01
    • 2021-04-12
    • 1970-01-01
    • 2012-06-25
    • 2012-03-07
    • 2015-07-16
    • 1970-01-01
    • 2015-11-18
    相关资源
    最近更新 更多