Hello, I still have the same problem. I have the following piece of code if (linkdb == null) { System.out.println("Null linkdb"); } else { System.out.println("LinkDB not null"); } Inlinks inlinks = linkdb.getInlinks(url); System.out.println("a");
On the output I can see it always prints "LinkDB not null", so linkdb is not null. But "a" never gets printed, so I guess that at: " Inlinks inlinks = linkdb.getInlinks(url); " there is some error. Maybe the getInlinks function throws an IOException? I do catch the IOException, but the catch block is never executed either. One question, how should I create the LinkDBReader? I do it the following way: linkdb = new LinkDbReader(getConf(), new Path("crawl/linkdb")); Is it right? Thanks. On Wed, Jan 21, 2009 at 10:16 AM, Pau <pau...@gmail.com> wrote: > Ok, I think you are right, maybe "inlinks" is null. I will try it now. > Thank you! > I have no information about the exception. It seems that simply the program > skips this part of the code... maybe a ScoringFilterExcetion is thrown? > > > On Wed, Jan 21, 2009 at 9:47 AM, Doğacan Güney <doga...@gmail.com> wrote: > >> On Tue, Jan 20, 2009 at 7:18 PM, Pau <pau...@gmail.com> wrote: >> > Hello, >> > I want to create a new ScoringFilter plugin. In order to evaluate how >> > interesting a web page is, I need information about the link structure >> in >> > the LinkDB. >> > In the method updateDBScore, I have the following lines (among others): >> > >> > 88 linkdb = new LinkDbReader(getConf(), >> new >> > Path("crawl/linkdb")); >> > ... >> > 99 System.out.println("Inlinks to " + >> url); >> > 100 Inlinks inlinks = >> linkdb.getInlinks(url); >> > 101 System.out.println("a"); >> > 102 Iterator<Inlink> iIt = >> inlinks.iterator(); >> > 103 System.out.println("b"); >> > >> > "a" always gets printed, but "b" rarely gets printed, so this seems that >> in >> > line 102 an error happens, and an exeception is raised. Do you know why >> this >> > is happening? What am I doing wrong? Thanks. >> > >> >> Maybe there are no inlinks to that page so "inlinks" is null? What is >> the exception >> exactly? >> >> > >> >> >> >> -- >> Doğacan Güney >> > >