kfaraz commented on code in PR #18195:
URL: https://github.com/apache/druid/pull/18195#discussion_r2184153803
##########
server/src/main/java/org/apache/druid/client/coordinator/CoordinatorClient.java:
##########
@@ -112,4 +116,43 @@ public interface CoordinatorClient
* @param tier The name of the tier for which the lookup configuration is to
be fetched.
*/
Map<String, LookupExtractorFactoryContainer> fetchLookupsForTierSync(String
tier);
+
+ /**
+ * Returns an iterator over the metadata segments in the cluster.
+ * <p>
+ * API: {@code GET
/druid/coordinator/v1/metadata/segments?includeOvershadowedStatus&includeRealtimeSegments}
+ *
+ * @param watchedDataSources Optional datasources to filter the segments by.
If null or empty, all segments are returned.
+ */
+ ListenableFuture<CloseableIterator<SegmentStatusInCluster>>
getMetadataSegments(
+ @Nullable Set<String> watchedDataSources
+ );
+
+ /**
+ * Returns the current snapshot of the rules.
+ * <p>
+ * API: {@code GET /druid/coordinator/v1/rules}
+ */
+ ListenableFuture<Map<String, List<Rule>>> getRules();
+
+ /**
+ * Returns the current coordinator leader's URI.
+ * <p>
+ * API: {@code GET /druid/coordinator/v1/leader}
+ */
+ ListenableFuture<URI> findCurrentLeader();
+
+ /**
+ * Returns the serialized user map for the given prefix stored in
coordinator.
+ * <p>
+ * API: {@code GET
/druid-ext/basic-security/authorization/db/<prefix>/cachedSerializedUserMap}
+ */
+ byte[] getCachedSerializedUserMapSync(String prefix);
+
+ /**
+ * Returns the serialized group mapping and role map for the given prefix
stored in coordinator.
+ * <p>
+ * API: {@code GET
/druid-ext/basic-security/authorization/db/<prefix>/cachedSerializedGroupMappingMap}
+ */
+ byte[] getCachedSerializedGroupMappingMapSync(String prefix);
Review Comment:
+1, returning the `byte[]` doesn't seem appropriate.
We can consider moving the necessary classes.
Will sync up with @uds5501 to figure out the best approach.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]