public class BatchAppenderatorDriver extends BaseAppenderatorDriver
APPENDING -> PUSHED_AND_DROPPED -> PUBLISHED
appenderator, executor, segments
Constructor and Description |
---|
BatchAppenderatorDriver(Appenderator appenderator,
SegmentAllocator segmentAllocator,
UsedSegmentChecker usedSegmentChecker)
Create a driver.
|
Modifier and Type | Method and Description |
---|---|
AppenderatorDriverAddResult |
add(InputRow row,
String sequenceName)
Add a row.
|
com.google.common.util.concurrent.ListenableFuture<SegmentsAndMetadata> |
publishAll(TransactionalSegmentPublisher publisher)
Publish all segments.
|
SegmentsAndMetadata |
pushAllAndClear(long pushAndClearTimeoutMs)
Push and drop all segments in the
SegmentWithState.SegmentState.APPENDING state. |
Object |
startJob()
This method always returns null because batch ingestion doesn't support restoring tasks on failures.
|
append, clear, close
public BatchAppenderatorDriver(Appenderator appenderator, SegmentAllocator segmentAllocator, UsedSegmentChecker usedSegmentChecker)
appenderator
- appenderatorsegmentAllocator
- segment allocatorusedSegmentChecker
- used segment checker@Nullable public Object startJob()
startJob
in class BaseAppenderatorDriver
public AppenderatorDriverAddResult add(InputRow row, String sequenceName) throws IOException
row
- the row to addsequenceName
- sequenceName for this row's segmentAppenderatorDriverAddResult
IOException
- if there is an I/O error while allocating or writing to a segmentpublic SegmentsAndMetadata pushAllAndClear(long pushAndClearTimeoutMs) throws InterruptedException, ExecutionException, TimeoutException
SegmentWithState.SegmentState.APPENDING
state.pushAndClearTimeoutMs
- timeout for pushing and dropping segmentsSegmentsAndMetadata
for pushed and dropped segmentsInterruptedException
ExecutionException
TimeoutException
public com.google.common.util.concurrent.ListenableFuture<SegmentsAndMetadata> publishAll(TransactionalSegmentPublisher publisher)
publisher
- segment publisherListenableFuture
for the publish taskCopyright © 2011–2018. All rights reserved.