uds5501 commented on code in PR #18195:
URL: https://github.com/apache/druid/pull/18195#discussion_r2183388030


##########
server/src/main/java/org/apache/druid/client/coordinator/CoordinatorClientImpl.java:
##########
@@ -276,6 +290,99 @@ public Map<String, LookupExtractorFactoryContainer> 
fetchLookupsForTierSync(Stri
     }
   }
 
+  @Override
+  public JsonParserIterator<SegmentStatusInCluster> getMetadataSegmentsSync(
+      @Nullable Set<String> watchedDataSources
+  )
+  {
+    final StringBuilder pathBuilder = new StringBuilder(
+        
"/druid/coordinator/v1/metadata/segments?includeOvershadowedStatus&includeRealtimeSegments");
+    if (watchedDataSources != null && !watchedDataSources.isEmpty()) {
+      for (String dataSource : watchedDataSources) {
+        
pathBuilder.append("&dataSource=").append(StringUtils.urlEncode(dataSource));
+      }
+    }
+
+    try {
+      String query = pathBuilder.toString();
+      InputStreamFullResponseHolder responseHolder = client.request(
+          new RequestBuilder(HttpMethod.GET, query),
+          new InputStreamFullResponseHandler()
+      );
+
+      if (responseHolder.getStatus().getCode() != HttpServletResponse.SC_OK) {
+        throw new RE(

Review Comment:
   Not required anymore.
   
   > I added it in the first place to emulate the lack of http exception thrown 
in non 200 responses.
   



-- 
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]

Reply via email to