mirror of
https://github.com/apache/druid.git
synced 2025-02-10 03:55:02 +00:00
Summary of changes --------------------- - Add `OverlordDataSourcesResource` with APIs to mark segments used/unused - Add corresponding methods to `OverlordClient` - Deprecate Coordinator APIs to update segments - Use `OverlordClient` in `DataSourcesResource` so that Coordinator APIs internally call the corresponding Overlord APIs - If the API call fails, fall back to updating the metadata store directly - Audit these actions only on the Overlord Other minor changes --------------------- - Do not perform null check on `OverlordClient` on the coordinator side `DataSourcesResource`. `OverlordClient` is always non-null in production. - Add new tests, fix existing ones - Complete the implementation of `TestSegmentsMetadataManager` New Overlord APIs ------------------ - Mark all segments of a datasource as unused: `POST /druid/indexer/v1/datasources/{dataSourceName}` - Mark all (non-overshadowed) segments of a datasource as used: `DELETE /druid/indexer/v1/datasources/{dataSourceName}` - Mark multiple segments as used `POST /druid/indexer/v1/datasources/{dataSourceName}/markUsed` - Mark multiple (non-overshadowed) segments as unused `POST /druid/indexer/v1/datasources/{dataSourceName}/markUnused` - Mark a single segment as used: `POST /druid/indexer/v1/datasources/{dataSourceName}/segments/{segmentId}` - Mark a single segment as unused: `DELETE /druid/indexer/v1/datasources/{dataSourceName}/segments/{segmentId}`