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