Fokko commented on a change in pull request #7925: Use
ComplexMetrics.registerSerde() across the codebase
URL: https://github.com/apache/incubator-druid/pull/7925#discussion_r296434960
##########
File path:
benchmarks/src/main/java/org/apache/druid/benchmark/FilterPartitionBenchmark.java
##########
@@ -149,9 +149,7 @@ public void setup() throws IOException
{
log.info("SETUP CALLED AT " + System.currentTimeMillis());
- if (ComplexMetrics.getSerdeForType("hyperUnique") == null) {
- ComplexMetrics.registerSerde("hyperUnique", new
HyperUniquesSerde(HyperLogLogHash.getDefault()));
- }
+ ComplexMetrics.registerSerde("hyperUnique", () -> new
HyperUniquesSerde(HyperLogLogHash.getDefault()));
Review comment:
I would create a constant for `hyperUnique` to avoid typo's. Similar to the
`THETA_SKETCH`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]