findingrish commented on code in PR #15817:
URL: https://github.com/apache/druid/pull/15817#discussion_r1555513783
##########
services/src/main/java/org/apache/druid/cli/CliIndexer.java:
##########
@@ -146,6 +150,30 @@ public void configure(Binder binder)
JsonConfigProvider.bind(binder, "druid", DruidNode.class,
Parent.class);
JsonConfigProvider.bind(binder, "druid.worker",
WorkerConfig.class);
+ String serverViewType = (String) properties.getOrDefault(
+ ServerViewModule.SERVERVIEW_TYPE_PROPERTY,
+ ServerViewModule.DEFAULT_SERVERVIEW_TYPE
+ );
+
+ if
(Boolean.parseBoolean(properties.getProperty(CliCoordinator.CENTRALIZED_DATASOURCE_SCHEMA_ENABLED))
+ &&
!serverViewType.equals(ServerViewModule.SERVERVIEW_TYPE_HTTP)) {
+ throw DruidException
+ .forPersona(DruidException.Persona.ADMIN)
+ .ofCategory(DruidException.Category.UNSUPPORTED)
+ .build(
+ StringUtils.format(
+ "CentralizedDatasourceSchema feature is incompatible
with config %1$s=%2$s. "
+ + "Please consider switching to http based segment
discovery (set %1$s=%3$s) "
+ + "or disable the feature (set %4$s=false).",
+ ServerViewModule.SERVERVIEW_TYPE_PROPERTY,
+ serverViewType,
+ ServerViewModule.SERVERVIEW_TYPE_HTTP,
+ CliCoordinator.CENTRALIZED_DATASOURCE_SCHEMA_ENABLED
+ ));
+ }
+
+ JsonConfigProvider.bind(binder,
"druid.centralizedDatasourceSchema", CentralizedDatasourceSchemaConfig.class);
Review Comment:
The task uses this config to build and publish schema along with segment
metadata.
In general we are ensuring that none of the services come up in case of
incompatible configs.
--
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]