FrankChen021 commented on a change in pull request #12157:
URL: https://github.com/apache/druid/pull/12157#discussion_r785395593
##########
File path:
server/src/main/java/org/apache/druid/discovery/DiscoveryDruidNode.java
##########
@@ -35,22 +40,29 @@
*/
public class DiscoveryDruidNode
{
+ private static final Logger LOG = new Logger(DiscoveryDruidNode.class);
+ private static final TypeReference<Map<String, Object>>
RAW_DRUID_SERVICE_TYPE =
Review comment:
I don't see any reference to this static variable, do I miss something?
##########
File path:
server/src/main/java/org/apache/druid/discovery/DiscoveryDruidNode.java
##########
@@ -61,6 +73,28 @@ public DiscoveryDruidNode(
}
}
+ @JsonCreator
+ private static DiscoveryDruidNode fromJson(
+ @JsonProperty("druidNode") DruidNode druidNode,
+ @JsonProperty("nodeType") NodeRole nodeRole,
+ @JsonProperty("services") Map<String, Map<String, Object>> rawServices,
+ @JacksonInject ObjectMapper jsonMapper
+ )
+ {
+ Map<String, DruidService> services = new HashMap<>();
+ if (rawServices != null && !rawServices.isEmpty()) {
Review comment:
nit: can use `org.apache.druid.utils.CollectionUtils.isNullOrEmpty` to
check the `rawServices`
--
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]