public class PubSubSource<OUT> extends org.apache.flink.streaming.api.functions.source.RichSourceFunction<OUT> implements org.apache.flink.api.java.typeutils.ResultTypeQueryable<OUT>, org.apache.flink.streaming.api.functions.source.ParallelSourceFunction<OUT>, org.apache.flink.api.common.state.CheckpointListener, org.apache.flink.streaming.api.checkpoint.ListCheckpointed<AcknowledgeIdsForCheckpoint<String>>
| Modifier and Type | Class and Description |
|---|---|
static class |
PubSubSource.DeserializationSchemaBuilder
Part of
PubSubSource.PubSubSourceBuilder to set required fields. |
static interface |
PubSubSource.ProjectNameBuilder<OUT>
Part of
PubSubSource.PubSubSourceBuilder to set required fields. |
static class |
PubSubSource.PubSubSourceBuilder<OUT>
Builder to create PubSubSource.
|
static interface |
PubSubSource.SubscriptionNameBuilder<OUT>
Part of
PubSubSource.PubSubSourceBuilder to set required fields. |
| Modifier and Type | Field and Description |
|---|---|
protected AcknowledgeOnCheckpoint<String> |
acknowledgeOnCheckpoint |
protected org.apache.flink.streaming.connectors.gcp.pubsub.PubSubSource.AcknowledgeOnCheckpointFactory |
acknowledgeOnCheckpointFactory |
protected com.google.auth.Credentials |
credentials |
protected PubSubDeserializationSchema<OUT> |
deserializationSchema |
protected boolean |
isRunning |
protected int |
messagePerSecondRateLimit |
protected PubSubSubscriberFactory |
pubSubSubscriberFactory |
protected org.apache.flink.api.common.io.ratelimiting.FlinkConnectorRateLimiter |
rateLimiter |
protected PubSubSubscriber |
subscriber |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel() |
void |
close() |
org.apache.flink.api.common.typeinfo.TypeInformation<OUT> |
getProducedType() |
static PubSubSource.DeserializationSchemaBuilder |
newBuilder() |
void |
notifyCheckpointAborted(long checkpointId) |
void |
notifyCheckpointComplete(long checkpointId) |
void |
open(org.apache.flink.configuration.Configuration configuration) |
void |
restoreState(List<AcknowledgeIdsForCheckpoint<String>> state) |
void |
run(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<OUT> sourceContext) |
List<AcknowledgeIdsForCheckpoint<String>> |
snapshotState(long checkpointId,
long timestamp) |
getIterationRuntimeContext, getRuntimeContext, setRuntimeContextprotected final PubSubDeserializationSchema<OUT> deserializationSchema
protected final PubSubSubscriberFactory pubSubSubscriberFactory
protected final com.google.auth.Credentials credentials
protected final org.apache.flink.streaming.connectors.gcp.pubsub.PubSubSource.AcknowledgeOnCheckpointFactory acknowledgeOnCheckpointFactory
protected final org.apache.flink.api.common.io.ratelimiting.FlinkConnectorRateLimiter rateLimiter
protected final int messagePerSecondRateLimit
protected transient AcknowledgeOnCheckpoint<String> acknowledgeOnCheckpoint
protected transient PubSubSubscriber subscriber
protected transient volatile boolean isRunning
public void open(org.apache.flink.configuration.Configuration configuration)
throws Exception
open in interface org.apache.flink.api.common.functions.RichFunctionopen in class org.apache.flink.api.common.functions.AbstractRichFunctionExceptionpublic void run(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<OUT> sourceContext) throws Exception
public void close()
throws Exception
close in interface org.apache.flink.api.common.functions.RichFunctionclose in class org.apache.flink.api.common.functions.AbstractRichFunctionExceptionpublic void cancel()
cancel in interface org.apache.flink.streaming.api.functions.source.SourceFunction<OUT>public org.apache.flink.api.common.typeinfo.TypeInformation<OUT> getProducedType()
getProducedType in interface org.apache.flink.api.java.typeutils.ResultTypeQueryable<OUT>public static PubSubSource.DeserializationSchemaBuilder newBuilder()
public void notifyCheckpointComplete(long checkpointId)
throws Exception
notifyCheckpointComplete in interface org.apache.flink.api.common.state.CheckpointListenerExceptionpublic void notifyCheckpointAborted(long checkpointId)
notifyCheckpointAborted in interface org.apache.flink.api.common.state.CheckpointListenerpublic List<AcknowledgeIdsForCheckpoint<String>> snapshotState(long checkpointId, long timestamp) throws Exception
snapshotState in interface org.apache.flink.streaming.api.checkpoint.ListCheckpointed<AcknowledgeIdsForCheckpoint<String>>Exceptionpublic void restoreState(List<AcknowledgeIdsForCheckpoint<String>> state) throws Exception
restoreState in interface org.apache.flink.streaming.api.checkpoint.ListCheckpointed<AcknowledgeIdsForCheckpoint<String>>ExceptionCopyright © 2022–2024 The Apache Software Foundation. All rights reserved.