jihoonson commented on a change in pull request #10287:
URL: https://github.com/apache/druid/pull/10287#discussion_r551675826



##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -669,21 +669,31 @@ private void stopBeingLeader()
 
   private List<CoordinatorDuty> makeHistoricalManagementDuties()
   {
-    return ImmutableList.of(
-        new LogUsedSegments(),
+    List<CoordinatorDuty> duties = new ArrayList<>();
+    if (config.isLogUsedSegmentsDutyEnabled()) {
+      duties.add(new LogUsedSegments());
+    }
+    duties.addAll(ImmutableList.of(
         new UpdateCoordinatorStateAndPrepareCluster(),
         new RunRules(DruidCoordinator.this),
         new UnloadUnusedSegments(),
         new MarkAsUnusedOvershadowedSegments(DruidCoordinator.this),
         new BalanceSegments(DruidCoordinator.this),
         new EmitClusterStatsAndMetrics(DruidCoordinator.this)
+    ));
+    log.debug(
+        "Done making historical management duties %s",
+        duties.stream().map(duty -> 
duty.getClass().getName()).collect(Collectors.toList())
     );
+    return duties;

Review comment:
       nit: `Collections.unmodifiableList(duties)`

##########
File path: docs/configuration/index.md
##########
@@ -698,6 +698,7 @@ These Coordinator static configurations can be defined in 
the `coordinator/runti
 |`druid.coordinator.loadqueuepeon.repeatDelay`|The start and repeat delay for 
the loadqueuepeon, which manages the load and drop of segments.|PT0.050S (50 
ms)|
 |`druid.coordinator.asOverlord.enabled`|Boolean value for whether this 
Coordinator process should act like an Overlord as well. This configuration 
allows users to simplify a druid cluster by not having to deploy any standalone 
Overlord processes. If set to true, then Overlord console is available at 
`http://coordinator-host:port/console.html` and be sure to set 
`druid.coordinator.asOverlord.overlordService` also. See next.|false|
 |`druid.coordinator.asOverlord.overlordService`| Required, if 
`druid.coordinator.asOverlord.enabled` is `true`. This must be same value as 
`druid.service` on standalone Overlord processes and 
`druid.selectors.indexing.serviceName` on Middle Managers.|NULL|
+|`druid.coordinator.logUsedSegments.enabled`|Boolean value for whether or not 
the coordinator should execute the `LogUsedSegments` portion of its 
coordination work. `LogUsedSegments` is an informational job run by the 
Coordinator every coordination cycle which logs every segment at DEBUG level 
and the total number of used segments at INFO level. In addition to these logs, 
it emits an alert if a segment has a size less than 0. An admin can decide that 
forgoing this work may advantageous if they don't need any of the information 
provided.|

Review comment:
       Also, did you want to not document it?

##########
File path: docs/configuration/index.md
##########
@@ -698,6 +698,7 @@ These Coordinator static configurations can be defined in 
the `coordinator/runti
 |`druid.coordinator.loadqueuepeon.repeatDelay`|The start and repeat delay for 
the loadqueuepeon, which manages the load and drop of segments.|PT0.050S (50 
ms)|
 |`druid.coordinator.asOverlord.enabled`|Boolean value for whether this 
Coordinator process should act like an Overlord as well. This configuration 
allows users to simplify a druid cluster by not having to deploy any standalone 
Overlord processes. If set to true, then Overlord console is available at 
`http://coordinator-host:port/console.html` and be sure to set 
`druid.coordinator.asOverlord.overlordService` also. See next.|false|
 |`druid.coordinator.asOverlord.overlordService`| Required, if 
`druid.coordinator.asOverlord.enabled` is `true`. This must be same value as 
`druid.service` on standalone Overlord processes and 
`druid.selectors.indexing.serviceName` on Middle Managers.|NULL|
+|`druid.coordinator.logUsedSegments.enabled`|Boolean value for whether or not 
the coordinator should execute the `LogUsedSegments` portion of its 
coordination work. `LogUsedSegments` is an informational job run by the 
Coordinator every coordination cycle which logs every segment at DEBUG level 
and the total number of used segments at INFO level. In addition to these logs, 
it emits an alert if a segment has a size less than 0. An admin can decide that 
forgoing this work may advantageous if they don't need any of the information 
provided.|

Review comment:
       The default value column is missing.




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

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