Loading src/main/java/org/torproject/collector/bridgedescs/BridgeDescriptorParser.java +4 −1 Original line number Diff line number Diff line Loading @@ -3,6 +3,8 @@ package org.torproject.collector.bridgedescs; import org.torproject.collector.conf.ConfigurationException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; Loading @@ -26,7 +28,8 @@ public class BridgeDescriptorParser { /** Parses the first line of the given descriptor data to determine the * descriptor type and passes it to the sanitized bridges writer. */ public void parse(byte[] allData, String dateTime) { public void parse(byte[] allData, String dateTime) throws ConfigurationException { try { BufferedReader br = new BufferedReader(new StringReader( new String(allData, "US-ASCII"))); Loading src/main/java/org/torproject/collector/bridgedescs/BridgeSnapshotReader.java +3 −1 Original line number Diff line number Diff line Loading @@ -3,6 +3,8 @@ package org.torproject.collector.bridgedescs; import org.torproject.collector.conf.ConfigurationException; import org.apache.commons.codec.binary.Hex; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; Loading Loading @@ -32,7 +34,7 @@ public class BridgeSnapshotReader { * Reads the half-hourly snapshots of bridge descriptors from Tonga. */ public BridgeSnapshotReader(BridgeDescriptorParser bdp, File bridgeDirectoriesDir, File statsDirectory) { File bridgeDirectoriesDir, File statsDirectory) throws ConfigurationException { if (bdp == null || bridgeDirectoriesDir == null || statsDirectory == null) { Loading src/main/java/org/torproject/collector/bridgedescs/SanitizedBridgesWriter.java +3 −3 Original line number Diff line number Diff line Loading @@ -378,7 +378,7 @@ public class SanitizedBridgesWriter extends CollecTorMain { * Sanitizes a network status and writes it to disk. */ public void sanitizeAndStoreNetworkStatus(byte[] data, String publicationTime) { String publicationTime) throws ConfigurationException { if (this.persistenceProblemWithSecrets) { /* There's a persistence problem, so we shouldn't scrub more IP Loading Loading @@ -547,8 +547,8 @@ public class SanitizedBridgesWriter extends CollecTorMain { + "/" + smonth + "/statuses/" + sday + "/" + syear + smonth + sday + "-" + stime + "-" + "4A0CCD2DDC7995083D73F5D667100C8A5831F16D"); File rsyncFile = new File("recent/bridge-descriptors/statuses/" + tarballFile.getName()); File rsyncFile = new File(config.getPath(Key.RecentPath).toFile(), "bridge-descriptors/statuses/" + tarballFile.getName()); File[] outputFiles = new File[] { tarballFile, rsyncFile }; for (File outputFile : outputFiles) { outputFile.getParentFile().mkdirs(); Loading Loading
src/main/java/org/torproject/collector/bridgedescs/BridgeDescriptorParser.java +4 −1 Original line number Diff line number Diff line Loading @@ -3,6 +3,8 @@ package org.torproject.collector.bridgedescs; import org.torproject.collector.conf.ConfigurationException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; Loading @@ -26,7 +28,8 @@ public class BridgeDescriptorParser { /** Parses the first line of the given descriptor data to determine the * descriptor type and passes it to the sanitized bridges writer. */ public void parse(byte[] allData, String dateTime) { public void parse(byte[] allData, String dateTime) throws ConfigurationException { try { BufferedReader br = new BufferedReader(new StringReader( new String(allData, "US-ASCII"))); Loading
src/main/java/org/torproject/collector/bridgedescs/BridgeSnapshotReader.java +3 −1 Original line number Diff line number Diff line Loading @@ -3,6 +3,8 @@ package org.torproject.collector.bridgedescs; import org.torproject.collector.conf.ConfigurationException; import org.apache.commons.codec.binary.Hex; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; Loading Loading @@ -32,7 +34,7 @@ public class BridgeSnapshotReader { * Reads the half-hourly snapshots of bridge descriptors from Tonga. */ public BridgeSnapshotReader(BridgeDescriptorParser bdp, File bridgeDirectoriesDir, File statsDirectory) { File bridgeDirectoriesDir, File statsDirectory) throws ConfigurationException { if (bdp == null || bridgeDirectoriesDir == null || statsDirectory == null) { Loading
src/main/java/org/torproject/collector/bridgedescs/SanitizedBridgesWriter.java +3 −3 Original line number Diff line number Diff line Loading @@ -378,7 +378,7 @@ public class SanitizedBridgesWriter extends CollecTorMain { * Sanitizes a network status and writes it to disk. */ public void sanitizeAndStoreNetworkStatus(byte[] data, String publicationTime) { String publicationTime) throws ConfigurationException { if (this.persistenceProblemWithSecrets) { /* There's a persistence problem, so we shouldn't scrub more IP Loading Loading @@ -547,8 +547,8 @@ public class SanitizedBridgesWriter extends CollecTorMain { + "/" + smonth + "/statuses/" + sday + "/" + syear + smonth + sday + "-" + stime + "-" + "4A0CCD2DDC7995083D73F5D667100C8A5831F16D"); File rsyncFile = new File("recent/bridge-descriptors/statuses/" + tarballFile.getName()); File rsyncFile = new File(config.getPath(Key.RecentPath).toFile(), "bridge-descriptors/statuses/" + tarballFile.getName()); File[] outputFiles = new File[] { tarballFile, rsyncFile }; for (File outputFile : outputFiles) { outputFile.getParentFile().mkdirs(); Loading