Class ImmutableDruidDataSource

java.lang.Object
org.apache.druid.client.ImmutableDruidDataSource

public class ImmutableDruidDataSource extends Object
An immutable collection of metadata of segments (DataSegment objects), belonging to a particular data source.
See Also:
  • Constructor Details

  • Method Details

    • getName

      public String getName()
    • getProperties

      public Map<String,String> getProperties()
    • getSegments

      public Collection<DataSegment> getSegments()
    • getSegment

      public DataSegment getSegment(SegmentId segmentId)
    • getTotalSizeOfSegments

      public long getTotalSizeOfSegments()
      Returns the sum of the sizes of all segments in this ImmutableDruidDataSource.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      ImmutableDruidDataSource should be considered a container, not a data class. The idea is the same as behind prohibiting/limiting equals() (and therefore usage as HashSet/HashMap keys) of DataSegment: see https://github.com/apache/druid/issues/6358. When somebody wants to deduplicate ImmutableDruidDataSource objects, they would need to put them into a Map<String, ImmutableDruidDataSource> and resolve conflicts by name manually. See https://github.com/apache/druid/issues/7858
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      ImmutableDruidDataSource should be considered a container, not a data class. The idea is the same as behind prohibiting/limiting hashCode() (and therefore usage as HashSet/HashMap keys) of DataSegment: see https://github.com/apache/druid/issues/6358. When somebody wants to deduplicate ImmutableDruidDataSource objects, they would need to put them into a Map<String, ImmutableDruidDataSource> and resolve conflicts by name manually. See https://github.com/apache/druid/issues/7858
      Overrides:
      hashCode in class Object
    • equalsForTesting

      public boolean equalsForTesting(Object o)
      This method should only be used in tests.