mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-11-09 07:24:41 +00:00
Fix exceptions at launch, post-crawl-finish
* KryoBinding.java
always default to registrationOptional, for now
* StatisticsTracker.java
explicitly set valueClass of sourceDistribution to ConcurrentHashMap
* StoredQueue.java
answer 0 for size() when backing DB closed
This commit is contained in:
1 parent
93cf655bed
commit
bdd7f7e1ab
3 files changed
+12
-6
No files matched your search
@@ -332,8 +332,8 @@ public class StatisticsTracker
|
||||
|
||||
/** Keep track of URL counts per host per seed */
|
||||
@SuppressWarnings("unchecked")
|
||||
protected ObjectIdentityCache<String,ConcurrentMap> sourceHostDistribution =
|
||||
new ObjectIdentityMemCache<ConcurrentMap>(); // temp dummy;
|
||||
protected ObjectIdentityCache<String,ConcurrentHashMap> sourceHostDistribution =
|
||||
new ObjectIdentityMemCache<ConcurrentHashMap>(); // temp dummy;
|
||||
|
||||
/* Keep track of 'top' hosts for live reports */
|
||||
protected TopNSet hostsDistributionTop;
|
||||
@@ -367,7 +367,7 @@ public class StatisticsTracker
|
||||
boolean isRecover = (recoveryCheckpoint != null);
|
||||
try {
|
||||
this.sourceHostDistribution = bdb.getObjectCache("sourceHostDistribution",
|
||||
isRecover, ConcurrentMap.class);
|
||||
isRecover, ConcurrentHashMap.class);
|
||||
this.hostsDistribution = bdb.getObjectCache("hostsDistribution",
|
||||
isRecover, AtomicLong.class);
|
||||
this.hostsBytes = bdb.getObjectCache("hostsBytes",
|
||||
@@ -851,8 +851,8 @@ public class StatisticsTracker
|
||||
ConcurrentMap<String,AtomicLong> hostUriCount =
|
||||
sourceHostDistribution.getOrUse(
|
||||
source,
|
||||
new Supplier<ConcurrentMap>() {
|
||||
public ConcurrentMap<String, AtomicLong> get() {
|
||||
new Supplier<ConcurrentHashMap>() {
|
||||
public ConcurrentHashMap<String, AtomicLong> get() {
|
||||
return new ConcurrentHashMap<String,AtomicLong>();
|
||||
}});
|
||||
incrementMapCount(hostUriCount, hostname);
|
||||
|
||||
Reference in new issue
Block a user