有人尝试过使用Apache Nutch 2.3和MySQL吗?有人说Nutch 2.3不能再与MySQL一起使用,但看看ivy.xml中的组件,MySQL仍然在可能的依赖列表中。所以,我像在早期的Apache2.x版本中那样做了。这是我的ivy.xml(gora工件的一部分):
<!--================-->
<!-- Gora artifacts -->
<!--================-->
<!-- N.B. To use Gora SNAPSHOT's merely replace the 'ref' value with the SNAPSHOT version
and add changing="true" alongside the dependency declaration. An example has been
provided for the gora-core dependency as below -->
<dependency org="org.apache.gora" name="gora-core" rev="0.2.1" conf="*->default"/>
<!-- Uncomment this to use SQL as Gora backend. It should be noted that the
gora-sql 0.1.1-incubating artifact is NOT compatable with gora-core 0.3. Users should
downgrade to gora-core 0.2.1 in order to use SQL as a backend. -->
<dependency org="org.apache.gora" name="gora-sql" rev="0.1.1-incubating" conf="*->default" />
<!-- Uncomment this to use MySQL as database with SQL as Gora store. -->
<dependency org="mysql" name="mysql-connector-java" rev="5.1.18" conf="*->default"/>
对此使用ant runtime会产生一个错误,指向build.xml的第101行,说
deprecation="${javac.deprecation}">
有人有变通办法吗?谢谢
事实上,Nutch并不关心下面的数据库,Nutch通过Gora处理爬网数据库。因此,如果Gora支持数据库(MySQL,HBase,Cassandra),Nutch可以抓取并将内容放入数据库。请检查 gora 和 mysql 版本以修复您情况下的错误。您可以遵循本指南:http://www.solutions.asia/2013/06/installing-nutch-22-with-mysql-to.html。