public abstract class AbstractStreamFileConsumerFactory extends Object implements StreamConsumerFactory
StreamConsumerFactory using
MultiLiveStreamFileReader.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractStreamFileConsumerFactory(CConfiguration cConf,
StreamAdmin streamAdmin,
StreamConsumerStateStoreFactory stateStoreFactory) |
| Modifier and Type | Method and Description |
|---|---|
StreamConsumer |
create(Id.Stream streamId,
String namespace,
ConsumerConfig consumerConfig)
Creates a
StreamConsumer. |
protected abstract StreamConsumer |
create(TableId tableId,
StreamConfig streamConfig,
ConsumerConfig consumerConfig,
StreamConsumerStateStore stateStore,
StreamConsumerState beginConsumerState,
FileReader<StreamEventOffset,Iterable<StreamFileOffset>> reader,
ReadFilter extraFilter)
Creates a
StreamConsumer. |
void |
dropAll(Id.Stream streamId,
String namespace,
Iterable<Long> groupIds)
Deletes all consumer states for the given namespace and group ids.
|
protected abstract void |
dropTable(TableId tableId)
Deletes process states table.
|
protected void |
getFileOffsets(Location partitionLocation,
Collection<? super StreamFileOffset> fileOffsets,
int generation) |
protected AbstractStreamFileConsumerFactory(CConfiguration cConf, StreamAdmin streamAdmin, StreamConsumerStateStoreFactory stateStoreFactory)
protected abstract StreamConsumer create(TableId tableId, StreamConfig streamConfig, ConsumerConfig consumerConfig, StreamConsumerStateStore stateStore, StreamConsumerState beginConsumerState, FileReader<StreamEventOffset,Iterable<StreamFileOffset>> reader, @Nullable ReadFilter extraFilter) throws IOException
StreamConsumer.tableId - Id of the table for storing process statesstreamConfig - configuration of the stream to consume fromconsumerConfig - configuration of the consumerstateStore - The StreamConsumerStateStore for recording consumer statereader - The FileReader to read stream events fromStreamConsumerIOExceptionprotected abstract void dropTable(TableId tableId) throws IOException
tableId - Id of the process states table.IOExceptionprotected void getFileOffsets(Location partitionLocation, Collection<? super StreamFileOffset> fileOffsets, int generation) throws IOException
IOExceptionpublic final StreamConsumer create(Id.Stream streamId, String namespace, ConsumerConfig consumerConfig) throws IOException
StreamConsumerFactoryStreamConsumer.create in interface StreamConsumerFactorystreamId - Id of the streamnamespace - application namespace for the state table.consumerConfig - consumer configuration.StreamConsumer.IOExceptionpublic void dropAll(Id.Stream streamId, String namespace, Iterable<Long> groupIds) throws IOException
StreamConsumerFactorydropAll in interface StreamConsumerFactorystreamId - Id of the streamnamespace - application namespace for the state table.groupIds - set of group id that needs to have states cleared.IOExceptionCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.