Package org.apache.druid.metadata
Interface MetadataSupervisorManager
-
- All Known Implementing Classes:
SQLMetadataSupervisorManager
public interface MetadataSupervisorManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,List<VersionedSupervisorSpec>>getAll()List<VersionedSupervisorSpec>getAllForId(String id)Map<String,SupervisorSpec>getLatest()Return latest supervisors (both active and terminated)Map<String,SupervisorSpec>getLatestActiveOnly()Only return the latest active supervisorsMap<String,SupervisorSpec>getLatestTerminatedOnly()Only return the latest terminated supervisorsvoidinsert(String id, SupervisorSpec spec)intremoveTerminatedSupervisorsOlderThan(long timestamp)Remove terminated supervisors created before the given timestamp.voidstart()
-
-
-
Method Detail
-
start
void start()
-
insert
void insert(String id, SupervisorSpec spec)
-
getAll
Map<String,List<VersionedSupervisorSpec>> getAll()
-
getAllForId
List<VersionedSupervisorSpec> getAllForId(String id)
-
getLatest
Map<String,SupervisorSpec> getLatest()
Return latest supervisors (both active and terminated)- Returns:
- latest terminated supervisors
-
getLatestActiveOnly
Map<String,SupervisorSpec> getLatestActiveOnly()
Only return the latest active supervisors- Returns:
- latest active supervisors
-
getLatestTerminatedOnly
Map<String,SupervisorSpec> getLatestTerminatedOnly()
Only return the latest terminated supervisors- Returns:
- latest terminated supervisors
-
removeTerminatedSupervisorsOlderThan
int removeTerminatedSupervisorsOlderThan(long timestamp)
Remove terminated supervisors created before the given timestamp.- Parameters:
timestamp- timestamp in milliseconds- Returns:
- number of supervisor removed
-
-