[tor-commits] [collector/master] Remove dependency on DescriptorIndexCollector.

karsten at torproject.org karsten at torproject.org
Fri Nov 22 17:51:57 UTC 2019


commit cc3aa57e57cdcd632a6a8a360f08880f0ec57242
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Fri Nov 22 18:49:46 2019 +0100

    Remove dependency on DescriptorIndexCollector.
---
 src/main/java/org/torproject/metrics/collector/sync/SyncManager.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/torproject/metrics/collector/sync/SyncManager.java b/src/main/java/org/torproject/metrics/collector/sync/SyncManager.java
index 005501f..5a1a142 100644
--- a/src/main/java/org/torproject/metrics/collector/sync/SyncManager.java
+++ b/src/main/java/org/torproject/metrics/collector/sync/SyncManager.java
@@ -8,7 +8,6 @@ import org.torproject.descriptor.DescriptorCollector;
 import org.torproject.descriptor.DescriptorReader;
 import org.torproject.descriptor.DescriptorSourceFactory;
 import org.torproject.descriptor.UnparseableDescriptor;
-import org.torproject.descriptor.index.DescriptorIndexCollector;
 import org.torproject.metrics.collector.conf.Configuration;
 import org.torproject.metrics.collector.conf.ConfigurationException;
 import org.torproject.metrics.collector.conf.Key;
@@ -47,8 +46,8 @@ public class SyncManager {
       String marker, Configuration conf) throws ConfigurationException {
     Path basePath = conf.getPath(Key.SyncPath);
 
-    // The default implementation is less robust.
-    DescriptorCollector descriptorCollector = new DescriptorIndexCollector();
+    DescriptorCollector descriptorCollector
+        = DescriptorSourceFactory.createDescriptorCollector();
     for (URL source : sources) {
       try {
         File storage = new File(basePath.toFile(),



More information about the tor-commits mailing list