Apache Nutch 2.3 和 MySQL

Apache Nutch 2.3 and MySQL

是否有人尝试过使用 Apache Nutch 2.3 和 MySQL?有人说 Nutch 2.3 不能再与 MySQL 一起工作,但查看 ivy.xml 中的组件,MySQL 仍然在可能的依赖项列表中。所以,我像在较旧的 Apache 2.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.