cryptoe commented on code in PR #15475:
URL: https://github.com/apache/druid/pull/15475#discussion_r1444172676


##########
server/src/main/java/org/apache/druid/segment/metadata/AbstractSegmentMetadataCache.java:
##########
@@ -107,16 +107,16 @@
  */
 public abstract class AbstractSegmentMetadataCache<T extends 
DataSourceInformation>
 {
+  private static final EmittingLogger log = new 
EmittingLogger(AbstractSegmentMetadataCache.class);
+  private static final int MAX_SEGMENTS_PER_QUERY = 15000;
+  private static final long DEFAULT_NUM_ROWS = 0;
+
   // Newest segments first, so they override older ones.
-  private static final Comparator<SegmentId> SEGMENT_ORDER = Comparator
+  protected static final Comparator<SegmentId> SEGMENT_ORDER = Comparator

Review Comment:
   Whats the change in this class apart from field access change ?



##########
services/src/main/java/org/apache/druid/cli/CliPeon.java:
##########
@@ -219,11 +220,20 @@ public void configure(Binder binder)
             taskDirPath = taskAndStatusFile.get(0);
             attemptId = taskAndStatusFile.get(1);
 
+            if 
(Boolean.parseBoolean(properties.getProperty("druid.centralizedDatasourceSchema.enabled"))
+                && !properties.getOrDefault("druid.serverview.type", 
"http").equals("http")) {
+              throw new RuntimeException(

Review Comment:
   This should be druidException for cluster administrator no ?



##########
services/src/main/java/org/apache/druid/cli/CliCoordinator.java:
##########
@@ -192,6 +194,12 @@ protected List<? extends Module> getModules()
     modules.add(JettyHttpClientModule.global());
 
     if (isSegmentMetadataCacheEnabled) {
+      if (!properties.getOrDefault(SERVERVIEW_TYPE_PROPERTY, 
"http").equals("http")) {
+        throw new RuntimeException(
+            "CentralizedDatasourceSchema feature is incompatible with 
Zookeeper based segment discovery. "

Review Comment:
   I think we should not mention zookeeper but just the value of 
`properties.getOrDefault(SERVERVIEW_TYPE_PROPERTY)`. If tomorrow we add new eay 
of announcing serviewViews that we need not change this piece of code. 



##########
services/src/main/java/org/apache/druid/cli/CliCoordinator.java:
##########
@@ -153,7 +154,8 @@ public class CliCoordinator extends ServerRunnable
 {
   private static final Logger log = new Logger(CliCoordinator.class);
   private static final String AS_OVERLORD_PROPERTY = 
"druid.coordinator.asOverlord.enabled";
-  private static final String CENTRALIZED_SCHEMA_MANAGEMENT_ENABLED = 
"druid.centralizedDatasourceSchema.enabled";
+  private static final String CENTRALIZED_DATASOURCE_SCHEMA_ENABLED = 
"druid.centralizedDatasourceSchema.enabled";
+  private static final String SERVERVIEW_TYPE_PROPERTY = 
"druid.serverview.type";

Review Comment:
   Please push this config to `ServerViewModule` and then reference them from 
there. 



-- 
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]

Reply via email to