如何使用 Hbase 1.2.6 编译 Nutch 2.3.1
How to compile Nutch 2.3.1 with Hbase 1.2.6
我必须使用 Nutch 2.3.1 设置 hadoop 堆栈。 hadoop 2.7.4 支持的 Hbase 版本是 1.2.6,我已经配置并测试成功。但是当我编译 Nutch 时,我得到了关注并抓取了一个示例页面,我得到了这个错误。
/usr/local/nutch/runtime/local/bin/nutch inject urls/ -crawlId kics
InjectorJob: starting at 2017-09-21 14:20:10
InjectorJob: Injecting urlDir: urls
Exception in thread "main" java.lang.NoSuchFieldError: HBASE_CLIENT_PREFETCH_LIMIT
at org.apache.hadoop.hbase.client.HConnectionKey.<clinit>(HConnectionKey.java:43)
at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:267)
at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:194)
at org.apache.gora.hbase.store.HBaseStore.initialize(HBaseStore.java:115)
at org.apache.gora.store.DataStoreFactory.initializeDataStore(DataStoreFactory.java:102)
at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:161)
at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:135)
at org.apache.nutch.storage.StorageUtils.createWebStore(StorageUtils.java:78)
at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:218)
at org.apache.nutch.crawl.InjectorJob.inject(InjectorJob.java:252)
at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:275)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.nutch.crawl.InjectorJob.main(InjectorJob.java:284)
Error running:
根据我的搜索如this and this,Hbase 1.x可以编译为Nutch 2.3.1。但是如何编译我不知道。有人可以指导(步骤等)
Apache Gora 0.7 是支持 HBase 1.2.3(+) 的版本:https://issues.apache.org/jira/browse/GORA-443
你可以看看那个答案中的 where I wrote how to modify Nutch 2.3.1 to work with Apache Gora 0.7. About the patch https://paste.apache.org/jjqz,在显示“0.7-SNAPSHOT”的地方使用“0.7”。
顺便说一下,昨天发布了 Apache Gora 0.8 :) 只需将 0.7 更改为 0.8 即可。
http://gora.apache.org/#20-september-2017-apache-gora-08-release
我必须使用 Nutch 2.3.1 设置 hadoop 堆栈。 hadoop 2.7.4 支持的 Hbase 版本是 1.2.6,我已经配置并测试成功。但是当我编译 Nutch 时,我得到了关注并抓取了一个示例页面,我得到了这个错误。
/usr/local/nutch/runtime/local/bin/nutch inject urls/ -crawlId kics
InjectorJob: starting at 2017-09-21 14:20:10
InjectorJob: Injecting urlDir: urls
Exception in thread "main" java.lang.NoSuchFieldError: HBASE_CLIENT_PREFETCH_LIMIT
at org.apache.hadoop.hbase.client.HConnectionKey.<clinit>(HConnectionKey.java:43)
at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:267)
at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:194)
at org.apache.gora.hbase.store.HBaseStore.initialize(HBaseStore.java:115)
at org.apache.gora.store.DataStoreFactory.initializeDataStore(DataStoreFactory.java:102)
at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:161)
at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:135)
at org.apache.nutch.storage.StorageUtils.createWebStore(StorageUtils.java:78)
at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:218)
at org.apache.nutch.crawl.InjectorJob.inject(InjectorJob.java:252)
at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:275)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.nutch.crawl.InjectorJob.main(InjectorJob.java:284)
Error running:
根据我的搜索如this and this,Hbase 1.x可以编译为Nutch 2.3.1。但是如何编译我不知道。有人可以指导(步骤等)
Apache Gora 0.7 是支持 HBase 1.2.3(+) 的版本:https://issues.apache.org/jira/browse/GORA-443
你可以看看那个答案中的
顺便说一下,昨天发布了 Apache Gora 0.8 :) 只需将 0.7 更改为 0.8 即可。
http://gora.apache.org/#20-september-2017-apache-gora-08-release