Class ImmutableDruidDataSource

    • Constructor Detail

      • ImmutableDruidDataSource

        public ImmutableDruidDataSource​(String name,
                                        Map<String,​String> properties,
                                        Map<org.apache.druid.timeline.SegmentId,​org.apache.druid.timeline.DataSegment> idToSegments)
        Concurrency: idToSegments argument might be a ConcurrentMap that is being updated concurrently while this constructor is executed.
      • ImmutableDruidDataSource

        public ImmutableDruidDataSource​(String name,
                                        Map<String,​String> properties,
                                        Collection<org.apache.druid.timeline.DataSegment> segments)
    • Method Detail

      • getName

        public String getName()
      • getSegments

        public Collection<org.apache.druid.timeline.DataSegment> getSegments()
      • getSegment

        public org.apache.druid.timeline.DataSegment getSegment​(org.apache.druid.timeline.SegmentId segmentId)
      • getTotalSizeOfSegments

        public long getTotalSizeOfSegments()
        Returns the sum of the sizes of all segments in this ImmutableDruidDataSource.
      • 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 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 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.