Java Doc for StatisticsSummary.java in  » Web-Crawler » heritrix » org » archive » crawler » admin » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Crawler » heritrix » org.archive.crawler.admin 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.archive.crawler.admin.StatisticsSummary

StatisticsSummary
public class StatisticsSummary (Code)
This class provides descriptive statistics of a finished crawl job by using the crawl report files generated by StatisticsTracker. Any formatting changes to the way StatisticsTracker writes to the summary crawl reports will require changes to this class.

The following statistics are accessible from this class:

  • Successfully downloaded documents per fetch status code
  • Successfully downloaded documents per document mime type
  • Amount of data per mime type
  • Successfully downloaded documents per host
  • Amount of data per host
  • Successfully downloaded documents per top-level domain name (TLD)
  • Disposition of all seeds
  • Successfully downloaded documents per host per source

TODO: Make it so summarizing is not done all in RAM so we avoid OOME.
author:
   Frank McCown
See Also:   org.archive.crawler.admin.StatisticsTracker



Field Summary
protected  StringbandwidthKbytesPerSec
    
protected  Hashtable<String, LongWrapper>dnsStatusCodeDistribution
    
protected  StringdurationTime
    
protected  Hashtable<String, LongWrapper>hostsBytes
    
protected  Hashtable<String, LongWrapper>hostsDistribution
    
protected  Hashtable<String, LongWrapper>hostsDnsBytes
    
protected  Hashtable<String, LongWrapper>hostsDnsDistribution
    
protected  Hashtable<String, LongWrapper>mimeTypeBytes
    
protected  Hashtable<String, LongWrapper>mimeTypeDistribution
    
protected  Hashtable<String, LongWrapper>mimeTypeDnsBytes
    
protected  Hashtable<String, LongWrapper>mimeTypeDnsDistribution
    
protected  StringprocessedDocsPerSec
    
protected transient  Map<String, SeedRecord>processedSeedsRecords
    
protected  Hashtable<String, LongWrapper>statusCodeDistribution
    
protected  Hashtable<String, LongWrapper>tldBytes
    
protected  Hashtable<String, LongWrapper>tldDistribution
    
protected  Hashtable<String, LongWrapper>tldHostDistribution
    
protected  StringtotalDataWritten
    
protected  longtotalDnsHostDocuments
    
protected  longtotalDnsHostSize
    
protected  longtotalDnsMimeSize
    
protected  longtotalDnsMimeTypeDocuments
    
protected  longtotalDnsStatusCodeDocuments
    
protected  longtotalFileTypeDocuments
    
protected  longtotalHostDocuments
    
protected  longtotalHostSize
    
protected  longtotalHosts
    
protected  longtotalMimeSize
    
protected  longtotalMimeTypeDocuments
    
protected  longtotalStatusCodeDocuments
    
protected  longtotalTldDocuments
    
protected  longtotalTldSize
    

Constructor Summary
public  StatisticsSummary(CrawlJob cjob)
    

Method Summary
public  StringgetBandwidthKbytesPerSec()
    
public  longgetBytesPerHost(String host)
     Returns the accumulated number of bytes downloaded from a given host.
public  longgetBytesPerMimeType(String filetype)
     Returns the accumulated number of bytes from files of a given file type.
Parameters:
  filetype - Filetype to check.
public  longgetBytesPerTld(String tld)
     Returns the total number of bytes downloaded for a given TLD.
public  HashtablegetDnsMimeDistribution()
    
public  HashtablegetDnsStatusCodeDistribution()
     Return a HashMap representing the distribution of DNS status codes for successfully fetched curis, as represented by a hashmap where key -> val represents (string)code -> (integer)count.
public  StringgetDurationTime()
    
public  HashtablegetHostsDnsDistribution()
    
public  longgetHostsPerTld(String tld)
     Get the number of hosts with a particular TLD.
public  HashtablegetMimeDistribution()
     Returns a HashMap that contains information about distributions of encountered mime types.
public  StringgetProcessedDocsPerSec()
    
public  TreeMap<String, LongWrapper>getReverseSortedCopy(Map<String, LongWrapper> mapOfLongWrapperValues)
     Sort the entries of the given HashMap in descending order by their values, which must be longs wrapped with LongWrapper.

Elements are sorted by value from largest to smallest.

public  SortedMapgetReverseSortedHostsDistribution()
     Return a copy of the hosts distribution in reverse-sorted (largest first) order.
public  Iterator<SeedRecord>getSeedRecordsSortedByStatusCode()
     Returns sorted Iterator of seeds records based on status code.
public  HashtablegetStatusCodeDistribution()
     Return a HashMap representing the distribution of HTTP status codes for successfully fetched curis, as represented by a hashmap where key -> val represents (string)code -> (integer)count.
public  HashtablegetTldBytes()
    
public  HashtablegetTldDistribution()
    
public  HashtablegetTldHostDistribution()
    
public  StringgetTotalDataWritten()
    
public  longgetTotalDnsHostDocuments()
    
public  longgetTotalDnsHostSize()
    
public  longgetTotalDnsMimeSize()
    
public  longgetTotalDnsMimeTypeDocuments()
    
public  longgetTotalDnsStatusCodeDocuments()
    
public  longgetTotalHostDnsDocuments()
    
public  longgetTotalHostDocuments()
    
public  longgetTotalHostSize()
    
public  longgetTotalHosts()
    
public  longgetTotalMimeSize()
    
public  longgetTotalMimeTypeDocuments()
    
public  longgetTotalStatusCodeDocuments()
    
public  longgetTotalTldDocuments()
    
public  longgetTotalTldSize()
    
protected static  voidincrementMapCount(Map<String, LongWrapper> map, String key)
     Increment a counter for a key in a given HashMap.
protected static  voidincrementMapCount(Map<String, LongWrapper> map, String key, long increment)
     Increment a counter for a key in a given HashMap by an arbitrary amount. Used for various aggregate data.
public  booleanisStats()
    
public  booleanreadCrawlReport()
     Reads duration time, processed docs/sec, bandwidth, and total size of crawl from crawl-report.txt.

Field Detail
bandwidthKbytesPerSec
protected String bandwidthKbytesPerSec(Code)



dnsStatusCodeDistribution
protected Hashtable<String, LongWrapper> dnsStatusCodeDistribution(Code)



durationTime
protected String durationTime(Code)



hostsBytes
protected Hashtable<String, LongWrapper> hostsBytes(Code)



hostsDistribution
protected Hashtable<String, LongWrapper> hostsDistribution(Code)
Keep track of hosts



hostsDnsBytes
protected Hashtable<String, LongWrapper> hostsDnsBytes(Code)



hostsDnsDistribution
protected Hashtable<String, LongWrapper> hostsDnsDistribution(Code)



mimeTypeBytes
protected Hashtable<String, LongWrapper> mimeTypeBytes(Code)



mimeTypeDistribution
protected Hashtable<String, LongWrapper> mimeTypeDistribution(Code)
Keep track of the file types we see (mime type -> count)



mimeTypeDnsBytes
protected Hashtable<String, LongWrapper> mimeTypeDnsBytes(Code)



mimeTypeDnsDistribution
protected Hashtable<String, LongWrapper> mimeTypeDnsDistribution(Code)



processedDocsPerSec
protected String processedDocsPerSec(Code)



processedSeedsRecords
protected transient Map<String, SeedRecord> processedSeedsRecords(Code)
Keep track of processed seeds



statusCodeDistribution
protected Hashtable<String, LongWrapper> statusCodeDistribution(Code)
Keep track of status codes



tldBytes
protected Hashtable<String, LongWrapper> tldBytes(Code)



tldDistribution
protected Hashtable<String, LongWrapper> tldDistribution(Code)
Keep track of TLDs



tldHostDistribution
protected Hashtable<String, LongWrapper> tldHostDistribution(Code)



totalDataWritten
protected String totalDataWritten(Code)



totalDnsHostDocuments
protected long totalDnsHostDocuments(Code)



totalDnsHostSize
protected long totalDnsHostSize(Code)



totalDnsMimeSize
protected long totalDnsMimeSize(Code)



totalDnsMimeTypeDocuments
protected long totalDnsMimeTypeDocuments(Code)



totalDnsStatusCodeDocuments
protected long totalDnsStatusCodeDocuments(Code)



totalFileTypeDocuments
protected long totalFileTypeDocuments(Code)



totalHostDocuments
protected long totalHostDocuments(Code)



totalHostSize
protected long totalHostSize(Code)



totalHosts
protected long totalHosts(Code)



totalMimeSize
protected long totalMimeSize(Code)



totalMimeTypeDocuments
protected long totalMimeTypeDocuments(Code)



totalStatusCodeDocuments
protected long totalStatusCodeDocuments(Code)



totalTldDocuments
protected long totalTldDocuments(Code)



totalTldSize
protected long totalTldSize(Code)




Constructor Detail
StatisticsSummary
public StatisticsSummary(CrawlJob cjob)(Code)
Constructor
Parameters:
  cjob - Completed crawl job




Method Detail
getBandwidthKbytesPerSec
public String getBandwidthKbytesPerSec()(Code)



getBytesPerHost
public long getBytesPerHost(String host)(Code)
Returns the accumulated number of bytes downloaded from a given host.
Parameters:
  host - name of the host the accumulated number of bytes downloaded from a given host



getBytesPerMimeType
public long getBytesPerMimeType(String filetype)(Code)
Returns the accumulated number of bytes from files of a given file type.
Parameters:
  filetype - Filetype to check. the accumulated number of bytes from files of a given mime type



getBytesPerTld
public long getBytesPerTld(String tld)(Code)
Returns the total number of bytes downloaded for a given TLD.
Parameters:
  tld - TLD the total number of bytes downloaded for a given TLD



getDnsMimeDistribution
public Hashtable getDnsMimeDistribution()(Code)



getDnsStatusCodeDistribution
public Hashtable getDnsStatusCodeDistribution()(Code)
Return a HashMap representing the distribution of DNS status codes for successfully fetched curis, as represented by a hashmap where key -> val represents (string)code -> (integer)count. Note: All the values are wrapped with a LongWrapper LongWrapper dnsStatusCodeDistribution



getDurationTime
public String getDurationTime()(Code)



getHostsDnsDistribution
public Hashtable getHostsDnsDistribution()(Code)



getHostsPerTld
public long getHostsPerTld(String tld)(Code)
Get the number of hosts with a particular TLD.
Parameters:
  tld - top-level domain name Total crawled hosts



getMimeDistribution
public Hashtable getMimeDistribution()(Code)
Returns a HashMap that contains information about distributions of encountered mime types. Key/value pairs represent mime type -> count.

Note: All the values are wrapped with a LongWrapper LongWrapper mimeTypeDistribution




getProcessedDocsPerSec
public String getProcessedDocsPerSec()(Code)



getReverseSortedCopy
public TreeMap<String, LongWrapper> getReverseSortedCopy(Map<String, LongWrapper> mapOfLongWrapperValues)(Code)
Sort the entries of the given HashMap in descending order by their values, which must be longs wrapped with LongWrapper.

Elements are sorted by value from largest to smallest. Equal values are sorted in an arbitrary, but consistent manner by their keys. Only items with identical value and key are considered equal. If the passed-in map requires access to be synchronized, the caller should ensure this synchronization.
Parameters:
  mapOfLongWrapperValues - Assumes values are wrapped with LongWrapper. a sorted set containing the same elements as the map.




getReverseSortedHostsDistribution
public SortedMap getReverseSortedHostsDistribution()(Code)
Return a copy of the hosts distribution in reverse-sorted (largest first) order. SortedMap of hosts distribution



getSeedRecordsSortedByStatusCode
public Iterator<SeedRecord> getSeedRecordsSortedByStatusCode()(Code)
Returns sorted Iterator of seeds records based on status code. sorted Iterator of seeds records



getStatusCodeDistribution
public Hashtable getStatusCodeDistribution()(Code)
Return a HashMap representing the distribution of HTTP status codes for successfully fetched curis, as represented by a hashmap where key -> val represents (string)code -> (integer)count. Note: All the values are wrapped with a LongWrapper LongWrapper statusCodeDistribution



getTldBytes
public Hashtable getTldBytes()(Code)



getTldDistribution
public Hashtable getTldDistribution()(Code)



getTldHostDistribution
public Hashtable getTldHostDistribution()(Code)



getTotalDataWritten
public String getTotalDataWritten()(Code)



getTotalDnsHostDocuments
public long getTotalDnsHostDocuments()(Code)



getTotalDnsHostSize
public long getTotalDnsHostSize()(Code)



getTotalDnsMimeSize
public long getTotalDnsMimeSize()(Code)



getTotalDnsMimeTypeDocuments
public long getTotalDnsMimeTypeDocuments()(Code)



getTotalDnsStatusCodeDocuments
public long getTotalDnsStatusCodeDocuments()(Code)



getTotalHostDnsDocuments
public long getTotalHostDnsDocuments()(Code)



getTotalHostDocuments
public long getTotalHostDocuments()(Code)



getTotalHostSize
public long getTotalHostSize()(Code)



getTotalHosts
public long getTotalHosts()(Code)



getTotalMimeSize
public long getTotalMimeSize()(Code)



getTotalMimeTypeDocuments
public long getTotalMimeTypeDocuments()(Code)



getTotalStatusCodeDocuments
public long getTotalStatusCodeDocuments()(Code)



getTotalTldDocuments
public long getTotalTldDocuments()(Code)



getTotalTldSize
public long getTotalTldSize()(Code)



incrementMapCount
protected static void incrementMapCount(Map<String, LongWrapper> map, String key)(Code)
Increment a counter for a key in a given HashMap. Used for various aggregate data.
Parameters:
  map - The HashMap
Parameters:
  key - The key for the counter to be incremented, if it does notexist it will be added (set to 1). If null it willincrement the counter "unknown".



incrementMapCount
protected static void incrementMapCount(Map<String, LongWrapper> map, String key, long increment)(Code)
Increment a counter for a key in a given HashMap by an arbitrary amount. Used for various aggregate data. The increment amount can be negative.
Parameters:
  map - The HashMap
Parameters:
  key - The key for the counter to be incremented, if it does notexist it will be added (set to equal toincrement).If null it will increment the counter "unknown".
Parameters:
  increment - The amount to increment counter related to thekey.



isStats
public boolean isStats()(Code)
True if we compiled stats, false if none to compile (e.g.there are no reports files on disk).



readCrawlReport
public boolean readCrawlReport()(Code)
Reads duration time, processed docs/sec, bandwidth, and total size of crawl from crawl-report.txt. true if stats found.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.