WIP - convert translators to lambdas#1676
Conversation
| HashSet<KeyExtent> fullScans = | ||
| new HashSet<>(Translator.translate(scanResult.fullScans, Translators.TKET)); | ||
| unscanned.keySet().removeAll(fullScans); | ||
| // translate full scans and remove them from unscanned |
There was a problem hiding this comment.
Can you move this comment one line down with the indent removed?
There was a problem hiding this comment.
Please remove the indent here.
There was a problem hiding this comment.
running mvn compile locally will format all of the source code I think and that may fix this up
There was a problem hiding this comment.
mvn compile may have issues with dependency resolution on the non-java modules (such as the native map module, which doesn't produce a java jar, but rather a tar.gz artifact). A better command, that won't have these issues in dependency resolution between sibling modules is mvn package -DskipTests. It does basically the same thing, but ensures that all artifacts are built in sibling modules, so there's no issues resolving non-java dependencies from sibling modules in the multi-module reactor build.
|
|
||
| } | ||
|
|
||
|
|
There was a problem hiding this comment.
Please remove these empty lines.
There was a problem hiding this comment.
We've already discussed this in person, but I'm including a comment here so anyone else can chime in; these kinds of transformation operations are good candidates for being moved to a separate utility class that supports multiple types of collection transformations using lambdas and function parameters. This would allow shorter function calls to improve readability, as well as make it available to the project. I'd be happy to help out with this effort.
There was a problem hiding this comment.
running mvn compile locally will format all of the source code I think and that may fix this up
|
|
||
| Map<TKeyExtent,List<TRange>> thriftTabletRanges = Translator.translate(requested, | ||
| Translators.KET, new Translator.ListTranslator<>(Translators.RT)); | ||
| Map<TKeyExtent, List<TRange>> thriftTabletRanges = requested.entrySet().stream() |
There was a problem hiding this comment.
With these changes, is it possible to remove any of the constants like Translators.KET?
|
If you run |
|
Closing, as this was superseded by #1802 |
Currently WIP to monitor progress on issue #1533 .