code: public Map<String, Long> getDataSourceCounts()
    {
      return dataSources.entrySet().stream()
                        .collect(Collectors.toMap(Entry::getKey, entry -> entry.getValue().getNumSegments()));
    }
docs: Returns a map of dataSource to the number of segments managed by this segmentManager.  This method should be
  carefully because the returned map might be different from the actual data source states.
  
  @return a map of dataSources and number of segments