#22141: Deprecate `DescriptorFile` and add relevant information to `Descriptor` ---------------------------------+----------------------------------- Reporter: karsten | Owner: metrics-team Type: enhancement | Status: needs_review Priority: Medium | Milestone: metrics-lib 1.9.0 Component: Metrics/metrics-lib | Version: Severity: Normal | Resolution: Keywords: | Actual Points: Parent ID: | Points: Reviewer: | Sponsor: ---------------------------------+-----------------------------------
Comment (by iwakeh): DescriptorReaderImpl became more readable. Maybe use Files.walkFileTree and an extension of SimpleFileVisitor to simplify the code which currently is in "readDescriptorFiles"? Regarding `Descriptor.getException`: The use case here is to determine, if the Descriptor object is valid and decide whether to use it or drop it? Then, why not add a `Descriptor.valid` method returning true or false? The detailed logging of exceptions could be configured if wanted in metrics-lib as an extra logging channel for parse exceptions (this code would need to be added still). About parsing "future or not" I have more questions than suggestions as it depends highly on the implementation. What do you have in mind? It would also introduce some overhead regarding the cancelling, how should that be handled? How should a client deal with the Futures it receives? BTW DescriptorImpl: The `NoSuchAlgorithmException` should be escalated as runtime exceptions, b/c this is a problem with the jdk/jvm and shouldn't be hidden away. I'd suggest using a private method for the two digest calls (please find a suggestion [https://gitweb.torproject.org/user/iwakeh /metrics- lib.git/commit/?h=task-22141&id=31a2f15bdc5933cc1f240cff107e01e0fce69a8d here]). -- Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22141#comment:7> Tor Bug Tracker & Wiki <https://trac.torproject.org/> The Tor Project: anonymity online _______________________________________________ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs