Package org.apache.druid.metadata
Class SQLMetadataSupervisorManager
java.lang.Object
org.apache.druid.metadata.SQLMetadataSupervisorManager
- All Implemented Interfaces:
MetadataSupervisorManager
-
Constructor Summary
ConstructorsConstructorDescriptionSQLMetadataSupervisorManager(com.fasterxml.jackson.databind.ObjectMapper jsonMapper, SQLMetadataConnector connector, com.google.common.base.Supplier<MetadataStorageTablesConfig> dbTables) -
Method Summary
Modifier and TypeMethodDescriptiongetAll()getAllForId(String id) Return latest supervisors (both active and terminated)Only return the latest active supervisorsOnly return the latest terminated supervisorsvoidinsert(String id, SupervisorSpec spec) intremoveTerminatedSupervisorsOlderThan(long timestamp) Remove terminated supervisors created before the given timestamp.voidstart()
-
Constructor Details
-
SQLMetadataSupervisorManager
@Inject public SQLMetadataSupervisorManager(com.fasterxml.jackson.databind.ObjectMapper jsonMapper, SQLMetadataConnector connector, com.google.common.base.Supplier<MetadataStorageTablesConfig> dbTables)
-
-
Method Details
-
start
public void start()- Specified by:
startin interfaceMetadataSupervisorManager
-
insert
- Specified by:
insertin interfaceMetadataSupervisorManager
-
getAll
- Specified by:
getAllin interfaceMetadataSupervisorManager
-
getAllForId
- Specified by:
getAllForIdin interfaceMetadataSupervisorManager
-
getLatest
Description copied from interface:MetadataSupervisorManagerReturn latest supervisors (both active and terminated)- Specified by:
getLatestin interfaceMetadataSupervisorManager- Returns:
- latest terminated supervisors
-
getLatestActiveOnly
Description copied from interface:MetadataSupervisorManagerOnly return the latest active supervisors- Specified by:
getLatestActiveOnlyin interfaceMetadataSupervisorManager- Returns:
- latest active supervisors
-
getLatestTerminatedOnly
Description copied from interface:MetadataSupervisorManagerOnly return the latest terminated supervisors- Specified by:
getLatestTerminatedOnlyin interfaceMetadataSupervisorManager- Returns:
- latest terminated supervisors
-
removeTerminatedSupervisorsOlderThan
public int removeTerminatedSupervisorsOlderThan(long timestamp) Description copied from interface:MetadataSupervisorManagerRemove terminated supervisors created before the given timestamp.- Specified by:
removeTerminatedSupervisorsOlderThanin interfaceMetadataSupervisorManager- Parameters:
timestamp- timestamp in milliseconds- Returns:
- number of supervisor removed
-