【发布时间】:2011-08-24 13:30:44
【问题描述】:
我在分布式模式下安装了 Hbase。数据库工作正常,如果我的 webapp(spring + datanucleus JDO) 部署在与 Hbase master 相同的机器上,我可以连接到数据库。
但如果我在另一台机器上运行相同的 webapp,我将无法连接到 HBase 服务器。根本没有例外,webapp 只是停止并在几分钟后超时。我的配置文件如下:
hbase-site.xml ->
<configuration>
<property>
<name>hbase.zookeeper.quorum</name>
<value><IP>:2181</value>
<description>The host and port that the HBase master runs at.
</description>
</property>
</configuration>
datanucleus.properties ->
javax.jdo.PersistenceManagerFactoryClass=org.datanucleus.api.jdo.JDOPersistenceManagerFactory
javax.jdo.option.ConnectionURL=hbase:
datanucleus.autoCreateSchema=true
datanucleus.autoCreateTables=true
datanucleus.autoCreateColumns=true
datanucleus.cache.level2.type=none
我在这里做错了什么。以及客户端机器应该可以访问的所有端口(因为在生产中我们只打开需要的端口)。
谢谢
【问题讨论】:
-
DataNucleus 只是获得“new HTable(config, tblName)”所以看不出它是如何具体的。低级 HBase 直接调用将是相同的
标签: jdo hbase datanucleus