maytasm commented on a change in pull request #11200:
URL: https://github.com/apache/druid/pull/11200#discussion_r627844675
##########
File path:
server/src/main/java/org/apache/druid/metadata/SQLMetadataSupervisorManager.java
##########
@@ -249,6 +252,34 @@ public Void withHandle(Handle handle) throws Exception
);
}
+ @Override
+ public int removeTerminatedSupervisorsOlderThan(long timestamp)
+ {
+ int removedCount = 0;
+ DateTime dateTime = DateTimes.utc(timestamp);
+ Map<String, SupervisorSpec> supervisors = getLatest();
+ for (Map.Entry<String, SupervisorSpec> supervisor :
supervisors.entrySet()) {
+ final SupervisorSpec spec = supervisor.getValue();
+ if (spec instanceof NoopSupervisorSpec) {
Review comment:
Yep. Terminated supervisor will have it's latest supervisorSpec as
NoopSupervisorSpec. (Basically NoopSupervisorSpec is used as a tombstone
indicator)
--
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]