Package org.apache.pinot.spi.stream
Class StreamConsumerFactory
- java.lang.Object
-
- org.apache.pinot.spi.stream.StreamConsumerFactory
-
public abstract class StreamConsumerFactory extends Object
Factory for a stream which provides a consumer and a metadata provider for the stream
-
-
Field Summary
Fields Modifier and Type Field Description protected StreamConfig_streamConfig
-
Constructor Summary
Constructors Constructor Description StreamConsumerFactory()
-
Method Summary
Modifier and Type Method Description PartitionGroupConsumercreatePartitionGroupConsumer(String clientId, PartitionGroupConsumptionStatus partitionGroupConsumptionStatus)Creates a partition group consumer, which can fetch messages from a partition groupabstract PartitionLevelConsumercreatePartitionLevelConsumer(String clientId, int partition)Creates a partition level consumer which can fetch messages from a partitioned streamabstract StreamMetadataProvidercreatePartitionMetadataProvider(String clientId, int partition)Creates a metadata provider which provides partition specific metadataabstract StreamLevelConsumercreateStreamLevelConsumer(String clientId, String tableName, Set<String> fieldsToRead, String groupId)Creates a stream level consumer (high level) which can fetch messages from the streamabstract StreamMetadataProvidercreateStreamMetadataProvider(String clientId)Creates a metadata provider which provides stream specific metadataStreamPartitionMsgOffsetFactorycreateStreamMsgOffsetFactory()
-
-
-
Field Detail
-
_streamConfig
protected StreamConfig _streamConfig
-
-
Method Detail
-
createPartitionLevelConsumer
public abstract PartitionLevelConsumer createPartitionLevelConsumer(String clientId, int partition)
Creates a partition level consumer which can fetch messages from a partitioned stream- Parameters:
clientId- a client id to identify the creator of this consumerpartition- the partition id of the partition for which this consumer is being created- Returns:
-
createStreamLevelConsumer
public abstract StreamLevelConsumer createStreamLevelConsumer(String clientId, String tableName, Set<String> fieldsToRead, String groupId)
Creates a stream level consumer (high level) which can fetch messages from the stream- Parameters:
clientId- a client id to identify the creator of this consumertableName- the table name for the topic of this consumerfieldsToRead- the fields to read from the source streamgroupId- consumer group Id- Returns:
- the stream level consumer
-
createPartitionMetadataProvider
public abstract StreamMetadataProvider createPartitionMetadataProvider(String clientId, int partition)
Creates a metadata provider which provides partition specific metadata- Parameters:
clientId- a client id to identify the creator of this consumerpartition- the partition id of the partition for which this metadata provider is being created- Returns:
-
createStreamMetadataProvider
public abstract StreamMetadataProvider createStreamMetadataProvider(String clientId)
Creates a metadata provider which provides stream specific metadata- Parameters:
clientId- a client id to identify the creator of this consumer- Returns:
-
createStreamMsgOffsetFactory
public StreamPartitionMsgOffsetFactory createStreamMsgOffsetFactory()
-
createPartitionGroupConsumer
public PartitionGroupConsumer createPartitionGroupConsumer(String clientId, PartitionGroupConsumptionStatus partitionGroupConsumptionStatus)
Creates a partition group consumer, which can fetch messages from a partition group
-
-