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.runtime.state.CheckpointListener, org.apache.flink.streaming.api.checkpoint.ListCheckpointed<AcknowledgeIdsForCheckpoint<String>>
| 限定符和类型 | 类和说明 |
|---|---|
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. |
| 限定符和类型 | 字段和说明 |
|---|---|
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 |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
cancel() |
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) |
protected 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 在接口中 org.apache.flink.api.common.functions.RichFunctionopen 在类中 org.apache.flink.api.common.functions.AbstractRichFunctionExceptionpublic void run(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<OUT> sourceContext) throws Exception
public void cancel()
cancel 在接口中 org.apache.flink.streaming.api.functions.source.SourceFunction<OUT>public org.apache.flink.api.common.typeinfo.TypeInformation<OUT> getProducedType()
getProducedType 在接口中 org.apache.flink.api.java.typeutils.ResultTypeQueryable<OUT>public static PubSubSource.DeserializationSchemaBuilder newBuilder()
public void notifyCheckpointComplete(long checkpointId)
throws Exception
notifyCheckpointComplete 在接口中 org.apache.flink.runtime.state.CheckpointListenerExceptionpublic void notifyCheckpointAborted(long checkpointId)
notifyCheckpointAborted 在接口中 org.apache.flink.runtime.state.CheckpointListenerpublic List<AcknowledgeIdsForCheckpoint<String>> snapshotState(long checkpointId, long timestamp) throws Exception
snapshotState 在接口中 org.apache.flink.streaming.api.checkpoint.ListCheckpointed<AcknowledgeIdsForCheckpoint<String>>Exceptionpublic void restoreState(List<AcknowledgeIdsForCheckpoint<String>> state) throws Exception
restoreState 在接口中 org.apache.flink.streaming.api.checkpoint.ListCheckpointed<AcknowledgeIdsForCheckpoint<String>>ExceptionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.