public interface SegmentAllocator
| Modifier and Type | Method and Description |
|---|---|
SegmentIdWithShardSpec |
allocate(InputRow row,
String sequenceName,
String previousSegmentId,
boolean skipSegmentLineageCheck)
Allocates a new segment for a given timestamp.
|
@Nullable SegmentIdWithShardSpec allocate(InputRow row, String sequenceName, @Nullable String previousSegmentId, boolean skipSegmentLineageCheck) throws IOException
row - the event which triggered this allocation requestsequenceName - sequenceName for this allocationpreviousSegmentId - segment identifier returned on the previous call to allocate for your sequenceName.
When skipSegmentLineageCheck is false, this can be null if it is the first call
for the same sequenceName.
When skipSegmentLineageCheck is true, this will be ignored.skipSegmentLineageCheck - if true, perform lineage validation using previousSegmentId for this sequence.
Should be set to false if replica tasks would index events in same orderIOExceptionCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.