0

我正在尝试在 Debian Squeeze 上使用 HBase 0.94.14 设置 Nutch 2.2.1。我仔细阅读了 Nutch 1 和 2 教程以及各种文档。我可以构建 HBase 0.94.14,并最终让它工作(我可以创建表等)我可以毫无问题地构建 Nutch(它设置在 Gora 0.3 上)

现在的问题是:1-尝试启动 Nutch 时,我得到以下跟踪:

./nutch inject /root/nutch/apache-nutch-2.2.1/urls/
InjectorJob: starting at 2014-11-27 09:43:53
InjectorJob: Injecting urlDir: /root/nutch/apache-nutch-2.2.1/urls
InjectorJob: java.lang.ClassNotFoundException: org.apache.gora.memory.store.HBaseStore
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)

等等

使用 strace -f,我发现找不到“HBaseStore.class”:

stat("/root/nutch/apache-nutch-2.2.1/runtime/local/org/apache/gora/memory/store/HBaseStore.class",\
  <unfinished ...>
[pid  1827] <... futex resumed> )       = -1 EAGAIN (Resource temporarily unavailable)

我试图弄清楚类路径是否存在问题,但最终发现: - HBaseStore.class 既不在 Nutch 目录树中,也不在 Hbase 0.94.4 目录树中 - Nutch 树中的 HBase jar 版本令人惊讶:hbase-0.90.4.jar

根据我发现的一些在线讨论,我将 nutch 树中的 hbase-0.90.4.jar 替换为 hbase 树中的 hbase-0.94.4 ...

但是: - 它不能解决 java 问题 - 每次我重建 nutch 时,hbase-0.90.4.jar 又回来了,我在 nutch 树中找不到它的任何来源:-/

请注意,/root/nutch/apache-nutch-2.2.1/conf/hbase-site.xml 具有:

<property>
<name>hbase.rootdir</name>
<value>/root/nutch/hbase-master/conf/</value>
</property>

对应于 Nutch 0.94.4 ...

还尝试重建和使用 Gora 0.5,但它使 Nutch 构建失败。

我根本不是 Java 专家,我不明白为什么 Nutch 没有使用正确版本的 HBase,为什么似乎缺少源代码和 java 类,此时我完全陷入困境。真是一团糟。

感谢您提供任何有助于挽救这种情况的提示。

4

3 回答 3

0

Are you sure you have this line in gora.properties:

gora.datastore.default=org.apache.gora.hbase.store.HBaseStore

with special attention to the namespace:

org.apache.gora.hbase.store.HBaseStore

and not

org.apache.gora.memory.store.HBaseStore

I hope this will fix the issue :)


Edit about versions:

About hbase-0.90.4 returning, Gora-0.3 depends on HBase-0.90.4, which is incompatible with HBase-0.94.14.

In order to run with HBase-0.94.14 you have to use Nutch-2.3-SNAPSHOT (called "2.x"). You have a link in Nutch2Tutorial or you can svn checkout http://svn.apache.org/repos/asf/nutch/branches/2.x/

Nutch 2.3-SNAPSHOT depends on Gora-0.5 which depends on HBase 0.94.14


Seems quite solved:

http://mail-archives.apache.org/mod_mbox/nutch-dev/201412.mbox/%3C548F4F1B.7020206@googlemail.com%3E

https://issues.apache.org/jira/browse/NUTCH-1899

于 2014-11-27T19:13:09.200 回答
0

阿方索,

我检查了 gora.properties,没问题。

此外,我尝试了最新的 2.3 快照,但不幸的是它在构建时出现了一些依赖问题:

[ivy:resolve]       ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]       ::          UNRESOLVED DEPENDENCIES         ::
[ivy:resolve]       ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]       ::   org.restlet.jse#org.restlet.lib.org.restlet.lib.org.json;2.0:     java.text.ParseException: inconsistent module descriptor file found in 'http://maven.restlet.org/org/restlet/jse/org.restlet.lib.org.restlet.lib.org.json/2.0/org.restlet.lib.org.restlet.lib.org.json-2.0.pom': bad module name: expected='org.restlet.lib.org.restlet.lib.org.json' found='org.restlet.lib.org.json'; 
[ivy:resolve]       ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :::: ERRORS
[ivy:resolve]       restlet: bad module name found in http://maven.restlet.org/org/restlet/jse/  org.restlet.lib.org.restlet.lib.org.json/2.0/org.restlet.lib.org.restlet.lib.org.json-2.0.pom: expected='org.restlet.lib.org.restlet.lib.org.json found='org.restlet.lib.org.json'
[ivy:resolve] 
[ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

BUILD FAILED
/root/nutch/2.3/build.xml:467: impossible to resolve dependencies:
        resolve failed - see output for details
于 2014-11-28T15:39:24.787 回答
0

尝试更新版本号:

  • 进入 ivy/ivy.xml;
  • 将 org="org.restlet.jse" 的 rev="2.2.1" 更改为 rev="2.2.3" (发生 3 次)。
于 2015-02-10T09:48:44.097 回答