Author: jnioche Date: Fri May 30 14:50:45 2014 New Revision: 1598619 URL: http://svn.apache.org/r1598619 Log: NUTCH-1634 : readdb -stats shows the result twice
Modified: nutch/branches/2.x/CHANGES.txt nutch/branches/2.x/src/java/org/apache/nutch/crawl/WebTableReader.java Modified: nutch/branches/2.x/CHANGES.txt URL: http://svn.apache.org/viewvc/nutch/branches/2.x/CHANGES.txt?rev=1598619&r1=1598618&r2=1598619&view=diff ============================================================================== --- nutch/branches/2.x/CHANGES.txt (original) +++ nutch/branches/2.x/CHANGES.txt Fri May 30 14:50:45 2014 @@ -2,7 +2,9 @@ Nutch Change Log Current Development -* * NUTCH-1780 ttl and gc_grace_seconds attributes are missing from gora-cassandra-mapping.xml file (kaveh minooie via lewismc) +* NUTCH-1634 readdb -stats shows the result twice (kaveh minooie via jnioche) + +* NUTCH-1780 ttl and gc_grace_seconds attributes are missing from gora-cassandra-mapping.xml file (kaveh minooie via lewismc) * NUTCH-1676 Add rudimentary SSL support to protocol-http (jnioche, markus) Modified: nutch/branches/2.x/src/java/org/apache/nutch/crawl/WebTableReader.java URL: http://svn.apache.org/viewvc/nutch/branches/2.x/src/java/org/apache/nutch/crawl/WebTableReader.java?rev=1598619&r1=1598618&r2=1598619&view=diff ============================================================================== --- nutch/branches/2.x/src/java/org/apache/nutch/crawl/WebTableReader.java (original) +++ nutch/branches/2.x/src/java/org/apache/nutch/crawl/WebTableReader.java Fri May 30 14:50:45 2014 @@ -210,9 +210,15 @@ public class WebTableReader extends Nutc if (LOG.isInfoEnabled()) { LOG.info("WebTable statistics start"); } + run(ToolUtil.toArgMap(Nutch.ARG_SORT, sort)); - for (Entry<String,Object> e : results.entrySet()) { - LOG.info(e.getKey() + ":\t" + e.getValue()); + + if (LOG.isInfoEnabled()) { + LOG.info("Statistics for WebTable: "); + for (Entry<String,Object> e : results.entrySet()) { + LOG.info(e.getKey() + ":\t" + e.getValue()); + } + LOG.info("WebTable statistics: done"); } } @@ -609,13 +615,7 @@ public class WebTableReader extends Nutc } // removing the tmp folder fileSystem.delete(tmpFolder, true); - if (LOG.isInfoEnabled()) { - LOG.info("Statistics for WebTable: "); - for (Entry<String,Object> e : results.entrySet()) { - LOG.info(e.getKey() + ":\t" + e.getValue()); - } - LOG.info("WebTable statistics: done"); - } + return results; } }