egor-ryashin commented on a change in pull request #6370: Introduce SegmentId 
class
URL: https://github.com/apache/incubator-druid/pull/6370#discussion_r224044327
 
 

 ##########
 File path: 
server/src/main/java/org/apache/druid/metadata/SQLMetadataSegmentManager.java
 ##########
 @@ -316,96 +315,127 @@ public Void withHandle(Handle handle)
   }
 
   @Override
-  public boolean removeDatasource(final String ds)
+  public boolean removeDataSource(final String dataSource)
   {
     try {
       final int removed = connector.getDBI().withHandle(
           handle -> handle.createStatement(
               StringUtils.format("UPDATE %s SET used=false WHERE dataSource = 
:dataSource", getSegmentsTable())
-          ).bind("dataSource", ds).execute()
+          ).bind("dataSource", dataSource).execute()
       );
 
-      dataSourcesRef.get().remove(ds);
+      dataSources.remove(dataSource);
 
       if (removed == 0) {
         return false;
       }
     }
     catch (Exception e) {
-      log.error(e, "Error removing datasource %s", ds);
+      log.error(e, "Error removing datasource %s", dataSource);
       return false;
     }
 
     return true;
   }
 
   @Override
-  public boolean removeSegment(String ds, final String segmentID)
+  public boolean removeSegment(String dataSourceName, final String segmentId)
 
 Review comment:
   Should we deprecate this method and comment that it exists for backward 
compatibility only?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to