I've figured this out...somewhat. The issue causing the error was that I was running MySQL with UTF-8 as default and needed to increase the size of the primarykey column in gora-sql-mapping.xml to 768 (which I had done but failed to realize I needed to recompile afterwards). Having said that although there is no longer an error the host table always seem to always be empty even when using a stock install of Nutch 2 and MySQL (not using UTF-8). Is the host table just used in memory and never persisted (perhaps because I am running in non-distributed mode)?
I will close the JIRA issue I opened as not a defect. -----Original Message----- From: Lewis John Mcgibbney [mailto:[email protected]] Sent: Saturday, October 20, 2012 11:15 PM To: [email protected] Subject: Re: Nutch 2.x, MySQL and readhostdb command. Hi James, Have you attempted to make any changes to the host table config in gora-sql-mapping? Lewis On Fri, Oct 19, 2012 at 10:26 AM, <[email protected]> wrote: > Could somebody confirm if the bin/nutch readhostdb command works with MySQL. > I am trying to figure out if it is broke or I don't know how to use it. > > Thanks > > James > > > bin/nutch readhostdb localhost > > HostDBReader: org.apache.gora.util.GoraException: java.io.IOException: > com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was > too long; max key length is 767 bytes > at > org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:167) > at > org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:135) > at > org.apache.nutch.storage.StorageUtils.createWebStore(StorageUtils.java:75) > at org.apache.nutch.host.HostDbReader.read(HostDbReader.java:44) > at org.apache.nutch.host.HostDbReader.run(HostDbReader.java:82) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) > at org.apache.nutch.host.HostDbReader.main(HostDbReader.java:68) > -- Lewis

