Author: lewismc
Date: Thu Jan 30 10:57:29 2014
New Revision: 1562774
URL: http://svn.apache.org/r1562774
Log:
NUTCH-1719 DomainStatistics fails in 2.x because URL is not unreversed
Modified:
nutch/branches/2.x/CHANGES.txt
nutch/branches/2.x/src/java/org/apache/nutch/util/domain/DomainStatistics.java
Modified: nutch/branches/2.x/CHANGES.txt
URL:
http://svn.apache.org/viewvc/nutch/branches/2.x/CHANGES.txt?rev=1562774&r1=1562773&r2=1562774&view=diff
==============================================================================
--- nutch/branches/2.x/CHANGES.txt (original)
+++ nutch/branches/2.x/CHANGES.txt Thu Jan 30 10:57:29 2014
@@ -2,6 +2,8 @@ Nutch Change Log
Current Development
+* NUTCH-1719 DomainStatistics fails in 2.x because URL is not unreversed
(Gerhard Gossen via lewismc)
+
* NUTCH-1253 Incompatable neko and xerces versions (snagel, lewismc)
* NUTCH-1715 RobotRulesParser adds additional '*' to the robots name (tejasp)
Modified:
nutch/branches/2.x/src/java/org/apache/nutch/util/domain/DomainStatistics.java
URL:
http://svn.apache.org/viewvc/nutch/branches/2.x/src/java/org/apache/nutch/util/domain/DomainStatistics.java?rev=1562774&r1=1562773&r2=1562774&view=diff
==============================================================================
---
nutch/branches/2.x/src/java/org/apache/nutch/util/domain/DomainStatistics.java
(original)
+++
nutch/branches/2.x/src/java/org/apache/nutch/util/domain/DomainStatistics.java
Thu Jan 30 10:57:29 2014
@@ -41,6 +41,7 @@ import org.apache.nutch.storage.StorageU
import org.apache.nutch.storage.WebPage;
import org.apache.nutch.util.NutchConfiguration;
import org.apache.nutch.util.NutchJob;
+import org.apache.nutch.util.TableUtil;
import org.apache.nutch.util.TimingUtil;
import org.apache.nutch.util.URLUtil;
import org.slf4j.Logger;
@@ -197,7 +198,7 @@ public class DomainStatistics extends Co
throws IOException, InterruptedException {
if (value.getStatus() == CrawlStatus.STATUS_FETCHED) {
try {
- URL url = new URL(key.toString());
+ URL url = new URL(TableUtil.unreverseUrl(key.toString()));
String out = null;
switch (mode) {
case MODE_HOST: