Interface TransactionalSegmentPublisher
-
public interface TransactionalSegmentPublisher
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SegmentPublishResultpublishAnnotatedSegments(Set<org.apache.druid.timeline.DataSegment> segmentsToBeOverwritten, Set<org.apache.druid.timeline.DataSegment> segmentsToPublish, Object commitMetadata)Publish segments, along with some commit metadata, in a single transaction.default SegmentPublishResultpublishSegments(Set<org.apache.druid.timeline.DataSegment> segmentsToBeOverwritten, Set<org.apache.druid.timeline.DataSegment> segmentsToPublish, Function<Set<org.apache.druid.timeline.DataSegment>,Set<org.apache.druid.timeline.DataSegment>> outputSegmentsAnnotateFunction, Object commitMetadata)default booleansupportsEmptyPublish()
-
-
-
Method Detail
-
publishAnnotatedSegments
SegmentPublishResult publishAnnotatedSegments(@Nullable Set<org.apache.druid.timeline.DataSegment> segmentsToBeOverwritten, Set<org.apache.druid.timeline.DataSegment> segmentsToPublish, @Nullable Object commitMetadata) throws IOException
Publish segments, along with some commit metadata, in a single transaction.- Returns:
- publish result that indicates if segments were published or not. If it is unclear if the segments were published or not, this method must throw an exception. The behavior is similar to IndexerSQLMetadataStorageCoordinator's announceHistoricalSegments.
- Throws:
IOException- if there was an I/O error when publishingRuntimeException- if we cannot tell if the segments were published or not, for some other reason
-
publishSegments
default SegmentPublishResult publishSegments(@Nullable Set<org.apache.druid.timeline.DataSegment> segmentsToBeOverwritten, Set<org.apache.druid.timeline.DataSegment> segmentsToPublish, Function<Set<org.apache.druid.timeline.DataSegment>,Set<org.apache.druid.timeline.DataSegment>> outputSegmentsAnnotateFunction, @Nullable Object commitMetadata) throws IOException
- Throws:
IOException
-
supportsEmptyPublish
default boolean supportsEmptyPublish()
- Returns:
- true if this publisher has action to take when publishing with an empty segment set. The publisher used by the seekable stream tasks is an example where this is true.
-
-