From f4949afdd7375f622b2b90c64a034a9411623260 Mon Sep 17 00:00:00 2001 From: Abhishek Radhakrishnan Date: Tue, 5 Dec 2023 22:30:32 -0800 Subject: [PATCH] clarify and fixup typos related to unused segments in docs and javadocs. (#15498) --- docs/api-reference/legacy-metadata-api.md | 2 +- .../overlord/IndexerMetadataStorageCoordinator.java | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/api-reference/legacy-metadata-api.md b/docs/api-reference/legacy-metadata-api.md index 6eb54c279b3..ae75a0b48c0 100644 --- a/docs/api-reference/legacy-metadata-api.md +++ b/docs/api-reference/legacy-metadata-api.md @@ -163,7 +163,7 @@ segment is unused, or is unknown, a 404 response is returned. `GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments/{segmentId}?includeUnused=true` -Returns full segment metadata for a specific segment as stored in the metadata store. If the is unknown, a 404 response +Returns full segment metadata for a specific segment as stored in the metadata store. If it is unknown, a 404 response is returned. `GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments` diff --git a/server/src/main/java/org/apache/druid/indexing/overlord/IndexerMetadataStorageCoordinator.java b/server/src/main/java/org/apache/druid/indexing/overlord/IndexerMetadataStorageCoordinator.java index 3cea2e6dd58..2a032545d72 100644 --- a/server/src/main/java/org/apache/druid/indexing/overlord/IndexerMetadataStorageCoordinator.java +++ b/server/src/main/java/org/apache/druid/indexing/overlord/IndexerMetadataStorageCoordinator.java @@ -433,11 +433,12 @@ public interface IndexerMetadataStorageCoordinator /** * Retrieve the segment for a given id from the metadata store. Return null if no such segment exists *
- * If includeUnused is set, this also returns unused segments. Unused segments could be deleted by a kill task at any - * time and might lead to unexpected behaviour. This option exists mainly to provide a consistent view of the metadata, - * for example, in calls from MSQ controller and worker and would generally not be requrired. + * If {@code includeUnused} is set, the segment {@code id} retrieval should also consider the set of unused segments + * in the metadata store. Unused segments could be deleted by a kill task at any time and might lead to unexpected behaviour. + * This option exists mainly to provide a consistent view of the metadata, for example, in calls from MSQ controller + * and worker and would generally not be required. * - * @param id The segment id + * @param id The segment id to retrieve * * @return DataSegment used segment corresponding to given id */