Conversation
leventov
left a comment
There was a problem hiding this comment.
_/- conversion is a thin ice. There is an number of places where enum name in converted back to string: BatchDataServerAnnouncer, ServersResource. Could it be avoided altogether, by giving INDEXER_/-EXECUTOR a single-word name?
Also there is a switch in DruidCluster which checks ServerType, please confirm it shouldn't be changed.
|
Thanks for the review! @leventov I initially considered renaming the nodeType to one word or switching the hyphen to an underscore, but I'm not familiar with the Druid-Zookeeper interactions, and wasn't clear on whether the rename would break something related to node/path handling there. I'm also wary of changing it for external compatibility reasons, I see at least one external piece of code that appears to assume that nodeType name, not sure if there are users out there that rely on the "indexer-executor" string: If someone has a clear view on the impact of changing the nodeType string, feedback would be much appreciated. Re: the switch in |
Throwing an exception looks fine, but it would be better to improve the error message. Currently it simply complains about |
|
Updated the patch:
|
There was a problem hiding this comment.
This might be not valid because INDEXER_EXECUTOR cannot hold segments?
There was a problem hiding this comment.
The peons will hold segments for some time as they're indexing, before they're handed off
There was a problem hiding this comment.
Shouldn't you annotate fromString() as @JsonCreator? Or it works already?
There was a problem hiding this comment.
I don't think there are instances where a ServerType is being deserialized directly, DruidServer and DruidServerMetadata would be such locations but they currently take a String "type" and DruidServerMetadata converts that String to a ServerType with fromString().
I'll look into adding @ JsonCreator here and changing DruidServer/DruidServerMetadata to accept a ServerType parameter.
|
@pjain1 Thanks, I'm going to push another update that fixes some unit test failures and the String->ServerType changes I mentioned |
|
@jon-wei thanks looking forward to it, lets get this fixed soon. |
|
Added |
I encountered a failure in a kafka indexing task after #4148 introduced ServerType:
This PR adds a ServerType for peons which have a nodeType of "indexer-executor".