nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gal Nitzan" <gnit...@usa.net>
Subject RE: Generator.java bug?
Date Fri, 02 Feb 2007 12:00:52 GMT

PS.

In the following code:

    if (readers == null || readers.length == 0 || !readers[0].next(new
FloatWritable())) {
      LOG.warn("Generator: 0 records selected for fetching, exiting ...");
      LockUtil.removeLockFile(fs, lock);
      fs.delete(tempDir);
      return null;
    }

>>>> There is no need for the if here 
    if (readers!=null)
      for (int i = 0; i < readers.length; i++) readers[i].close();

-----Original Message-----
From: Gal Nitzan [mailto:gnitzan@usa.net] 
Sent: Friday, February 02, 2007 1:56 PM
To: nutch-dev@lucene.apache.org
Subject: Generator.java bug?

Hi,

 

After many failures of generate "Generator: 0 records selected for fetching,
exiting ..." I made a post about it a few days back.

 

I narrowed down to the following function:

 

public Path generate(Path dbDir, Path segments, int numLists, long topN,
long curTime, boolean filter, boolean force)

 

in the following if:  if (readers == null || readers.length == 0 ||
!readers[0].next(new FloatWritable()))

 

 

It turns out that the: "!readers[0].next(new FloatWritable())" is the
culprit.

 

 

Gal




Mime
View raw message