kfaraz commented on code in PR #18844:
URL: https://github.com/apache/druid/pull/18844#discussion_r2697089883
##########
processing/src/main/java/org/apache/druid/guice/DruidSecondaryModule.java:
##########
@@ -164,6 +168,22 @@ public WireTransferableContext getWireTransferableContext(
return new WireTransferableContext(smileMapper, concreteDeserializer,
isUseLegacyFrameSerialization());
}
+ @Provides
+ @LazySingleton
+ @Deterministic
+ public ObjectMapper getSortedMapper(
+ Injector injector,
+ Map<ByteBuffer, WireTransferable.Deserializer> wtDeserializers
+ )
+ {
+ final ObjectMapper sortedMapper = new DefaultObjectMapper();
Review Comment:
> is this cool? as in, like does it matter that this will this be missing
all of the jackson modules that get registered with the normal jsonMapper?
Oh, wouldn't invoking `setupJackson` take care of that?
IIUC, the only thing we would miss is the `DefaultObjectMapper` being
initialized with service name (as done in `JcaksonModule` for the other
mappers). Please correct me if I am missing something.
> also, it seems like we inject it places so that we can make a
DefaultIndexingStateFingerprintMapper, should this just be an internal
implementation detail of DefaultIndexingStateFingerprintMapper?
Yeah, I suppose this would be okay too. Although, we would still need to
pass in the default `@Json ObjectMapper` and then make a copy inside the
fingerprint mapper. But I agree that it would be less error prone.
> I would imagine in the future we would want to just get the fingerprint
mapper from like the supervisor? (if it is configurable per datasource) or some
fingerpint factory or something (if system wide) instead of this special object
mapper used for the default impl in the future once this is made more pluggable
unless i'm missing something
Hmm, I am not sure. The logic to generate a fingerprint for a given indexing
state and to store and retrieve the state/fingerprint would continue to remain
core Druid logic. Supervisors provided by extensions may just have their custom
(serializable) implementations of the `CompactionState` class.
--
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]