public class BatchAppenderatorDriver extends BaseAppenderatorDriver
APPENDING -> PUSHED_AND_DROPPED -> PUBLISHED
appenderator, executor, segments| Constructor and Description |
|---|
BatchAppenderatorDriver(Appenderator appenderator,
SegmentAllocator segmentAllocator,
UsedSegmentChecker usedSegmentChecker,
DataSegmentKiller dataSegmentKiller)
Create a driver.
|
| Modifier and Type | Method and Description |
|---|---|
AppenderatorDriverAddResult |
add(InputRow row,
String sequenceName)
Add a row.
|
com.google.common.util.concurrent.ListenableFuture<SegmentsAndCommitMetadata> |
publishAll(Set<DataSegment> segmentsToBeOverwritten,
TransactionalSegmentPublisher publisher)
Publish all segments.
|
SegmentsAndCommitMetadata |
pushAllAndClear(long pushAndClearTimeoutMs)
Push and drop all segments in the
SegmentWithState.SegmentState.APPENDING state. |
Object |
startJob() |
Object |
startJob(AppenderatorDriverSegmentLockHelper lockHelper)
This method always returns null because batch ingestion doesn't support restoring tasks on failures.
|
append, clear, closepublic BatchAppenderatorDriver(Appenderator appenderator, SegmentAllocator segmentAllocator, UsedSegmentChecker usedSegmentChecker, DataSegmentKiller dataSegmentKiller)
appenderator - appenderatorsegmentAllocator - segment allocatorusedSegmentChecker - used segment checker@Nullable public Object startJob(AppenderatorDriverSegmentLockHelper lockHelper)
startJob in class BaseAppenderatorDriverpublic AppenderatorDriverAddResult add(InputRow row, String sequenceName) throws IOException
row - the row to addsequenceName - sequenceName for this row's segmentAppenderatorDriverAddResultIOException - if there is an I/O error while allocating or writing to a segmentpublic SegmentsAndCommitMetadata pushAllAndClear(long pushAndClearTimeoutMs) throws InterruptedException, ExecutionException, TimeoutException
SegmentWithState.SegmentState.APPENDING state.pushAndClearTimeoutMs - timeout for pushing and dropping segmentsSegmentsAndCommitMetadata for pushed and dropped segmentsInterruptedExceptionExecutionExceptionTimeoutExceptionpublic com.google.common.util.concurrent.ListenableFuture<SegmentsAndCommitMetadata> publishAll(@Nullable Set<DataSegment> segmentsToBeOverwritten, TransactionalSegmentPublisher publisher)
segmentsToBeOverwritten - segments which can be overwritten by new segments published by the given publisherpublisher - segment publisherListenableFuture for the publish taskCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.