Author: lewismc
Date: Tue May 26 15:41:57 2015
New Revision: 1681781
URL: http://svn.apache.org/r1681781
Log:
NUTCH-2019 ClassPathException sending topN argument for /job/create using Nutch
2.x RESTApi
Modified:
nutch/branches/2.x/CHANGES.txt
nutch/branches/2.x/src/java/org/apache/nutch/crawl/GeneratorJob.java
Modified: nutch/branches/2.x/CHANGES.txt
URL:
http://svn.apache.org/viewvc/nutch/branches/2.x/CHANGES.txt?rev=1681781&r1=1681780&r2=1681781&view=diff
==============================================================================
--- nutch/branches/2.x/CHANGES.txt (original)
+++ nutch/branches/2.x/CHANGES.txt Tue May 26 15:41:57 2015
@@ -2,6 +2,8 @@ Nutch Change Log
Current Development 2.4-SNAPSHOT
+* NUTCH-2019 ClassPathException sending topN argument for /job/create using
Nutch 2.x RESTApi (Alex Koh, lewismc)
+
* NUTCH-1923 Nutch + Cassandra Docker (Mohamed Meabed via lewismc)
* NUTCH-1994 Upgrade to Apache Tika 1.8 (lewismc)
Modified: nutch/branches/2.x/src/java/org/apache/nutch/crawl/GeneratorJob.java
URL:
http://svn.apache.org/viewvc/nutch/branches/2.x/src/java/org/apache/nutch/crawl/GeneratorJob.java?rev=1681781&r1=1681780&r2=1681781&view=diff
==============================================================================
--- nutch/branches/2.x/src/java/org/apache/nutch/crawl/GeneratorJob.java
(original)
+++ nutch/branches/2.x/src/java/org/apache/nutch/crawl/GeneratorJob.java Tue
May 26 15:41:57 2015
@@ -170,7 +170,12 @@ public class GeneratorJob extends NutchT
}
// map to inverted subset due for fetch, sort by score
- Long topN = (Long) args.get(Nutch.ARG_TOPN);
+ Long topN = null;
+ try {
+ topN = (Long) args.get(Nutch.ARG_TOPN);
+ } catch(Exception e) {
+ topN = Long.parseLong(args.get(Nutch.ARG_TOPN).toString());
+ }
Long curTime = (Long) args.get(Nutch.ARG_CURTIME);
if (curTime == null) {
curTime = System.currentTimeMillis();