JulianJaffePinterest commented on pull request #10920:
URL: https://github.com/apache/druid/pull/10920#issuecomment-990708563
@wangxiaobaidu11 you don't need to make changes to the druid spark code for
your use case - you can call `AggregatorFactoryRegistry.register("longUnique",
new LongUniqueAggregatorFactory("", "", 0)` from within your own spark app.
That's definitely still ugly since the AggregatorFactory instance is
unnecessary, but as mentioned in my previous comment this won't be the case for
long. If instantiating an instance is a problem, there is one other temporary
work-around: because all `AggregatorFactoryRegistry` does under the hood is
register subtypes, you can use the public package method `registerSubType`. In
your case, you would call `org.apache.druid.spark.registerSubtype(new
NamedType(classOf[LongUniqueAggregatorFactory], "longUnique"))` from your spark
app. (You can statically that method if you'd like, leaving just
`registerSubtype(...)`)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]