Bridge pool assignments are being rsync'ed from polyanthum to colchicifolium again. What remains is that CollecTor processes them. We should be able to reuse old code for this, but we'll have to update it quite a bit.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
There is not another "Processor" class in CollecTor. We already have: Annotation, Builder, Checker, Configuration, Criterium, Downloader, Exception, Hook, Json, Key, Main, Manager, Map, Metadata, Parser, Persistence, Reader, Scheduler, Type, Utils, Weblogs, Writer. That's a lot of concepts, can we reuse one for this? (I put a table later in this comment with the number of times each noun appears in the codebase.)
The startProcessing() function is huge and there are no tests for it. ): This also makes the review difficult. I'm relatively confident that we're not going to accidentally publish a load of raw bridge fingerprints but as to the correctness of the code, and the reliability, I'm less confident.
Saying this, if this huge function was working before then I'm happier about adding it back now and then filing tickets to break it down and add tests later. At least then it's not completely unknown new code.
There is not another "Processor" class in CollecTor. We already have: Annotation, Builder, Checker, Configuration, Criterium, Downloader, Exception, Hook, Json, Key, Main, Manager, Map, Metadata, Parser, Persistence, Reader, Scheduler, Type, Utils, Weblogs, Writer. That's a lot of concepts, can we reuse one for this? (I put a table later in this comment with the number of times each noun appears in the codebase.)
The name comes from the class that we retired a few years back. We could pick a new one, though. What this class does is: read files from disk, possibly split them by bridge pool assignment list, replace bridge fingerprints with sanitized ones, write one file per sanitized bridge pool assignment. I think processor is fine, but if you prefer something else, let's switch.
The startProcessing() function is huge and there are no tests for it. ): This also makes the review difficult. I'm relatively confident that we're not going to accidentally publish a load of raw bridge fingerprints but as to the correctness of the code, and the reliability, I'm less confident.
Saying this, if this huge function was working before then I'm happier about adding it back now and then filing tickets to break it down and add tests later. At least then it's not completely unknown new code.
I agree that the method is too long. I'm currently working on breaking it up. It did work a few years back, but now is a good time to clean it up a little. Will have something to review later this afternoon.
it is my first review so let me know if I could do better.
Please order statement following Java guidelines . This guidelines was been written in 1999 but is a good point to start and it is used also in static code analysis
Probably it make sense to create a constant for string "BridgePoolAssignments"
Instead of evaluate each time 330L * 60L * 1000L it is better to create a constant with meaningfull name
Instead of evaluate each time 3L * 24L * 60L * 60L * 1000L it is better to create a constant with meaningfull name
startProcessing it seems to complex, is it possible to split in more separated and testeable methods?
there are some for each loop, is it make sense use a functional approach using lambda?
Please let me know if I could help you in some way,
it is my first review so let me know if I could do better.
Please order statement following Java guidelines . This guidelines was been written in 1999 but is a good point to start and it is used also in static code analysis
What we'd really need is a way to automatically check this, just like how we have Checkstyle to check code style violations. Would you want to try out some tools that can do these checks? Requirement is that we can obtain them using ant resolve (using Ant Ivy internally) and that we can run them from Ant just like we're running Checkstyle. (This would be something for a new ticket.)
Probably it make sense to create a constant for string "BridgePoolAssignments"
One might think so, but these two strings actually mean something different. I'd rather not want to use a single constant for them, because that would imply that they're the same thing. What I'd really want is give up on using these string constants, but that's a larger refactoring than I'd want to do at the moment.
Instead of evaluate each time 330L * 60L * 1000L it is better to create a constant with meaningfull name
This is already changed in the more recent branch.
Instead of evaluate each time 3L * 24L * 60L * 60L * 1000L it is better to create a constant with meaningfull name
startProcessing it seems to complex, is it possible to split in more separated and testeable methods?
I already changed this in the more recent branch, too.
there are some for each loop, is it make sense use a functional approach using lambda?
Maybe, but to me this falls into the category of prettying code rather than reviewing that it's good to go in. It's more like the try-with-resource stuff that we could do anytime but which shouldn't block the merge in this case.
Please let me know if I could help you in some way,
Best Regards
Thanks for doing this review!
Here's one suggestion for the next review: Be sure to not only review the first commit, but also consider any follow-up commits in that branch. The way I'd do that is check out the branch and look at git diff $beforefirstcommit.., e.g., git diff 8010084.. in this case.
Looking good. That's a lot easier to read and follow now.
there are some for each loop, is it make sense use a functional approach using lambda?
We should look more at Java 8 Streams API because this gives us some parallel processing of many of the foreach loops. Not now, but something to think about.