public class KafkaScanFunction
extends org.apache.flink.streaming.api.functions.source.RichSourceFunction<org.apache.flink.table.data.RowData>
implements org.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.table.data.RowData>, org.apache.flink.streaming.api.checkpoint.CheckpointedFunction
| 构造器和说明 |
|---|
KafkaScanFunction(org.apache.flink.configuration.Configuration optionsWith,
List<org.apache.flink.table.types.logical.RowType.RowField> rowTypeFields,
org.apache.flink.table.catalog.UniqueConstraint primaryKey,
String tableName,
org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData> deserializationSchema)
需要在配置文件中存在相关的配置
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
cancel() |
static int[] |
createValueFormatProjection(org.apache.flink.table.types.DataType physicalDataType) |
org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> |
getProducedType() |
void |
initializeState(org.apache.flink.runtime.state.FunctionInitializationContext context) |
void |
open(org.apache.flink.configuration.Configuration parameters) |
void |
run(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<org.apache.flink.table.data.RowData> ctx) |
void |
setRuntimeContext(org.apache.flink.api.common.functions.RuntimeContext t) |
void |
snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext context) |
close, getIterationRuntimeContext, getRuntimeContextpublic KafkaScanFunction(org.apache.flink.configuration.Configuration optionsWith,
List<org.apache.flink.table.types.logical.RowType.RowField> rowTypeFields,
org.apache.flink.table.catalog.UniqueConstraint primaryKey,
String tableName,
org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData> deserializationSchema)
optionsWith - rowTypeFields - public void run(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<org.apache.flink.table.data.RowData> ctx)
throws Exception
run 在接口中 org.apache.flink.streaming.api.functions.source.SourceFunction<org.apache.flink.table.data.RowData>Exceptionpublic static int[] createValueFormatProjection(org.apache.flink.table.types.DataType physicalDataType)
public void cancel()
cancel 在接口中 org.apache.flink.streaming.api.functions.source.SourceFunction<org.apache.flink.table.data.RowData>public org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> getProducedType()
getProducedType 在接口中 org.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.table.data.RowData>public void setRuntimeContext(org.apache.flink.api.common.functions.RuntimeContext t)
setRuntimeContext 在接口中 org.apache.flink.api.common.functions.RichFunctionsetRuntimeContext 在类中 org.apache.flink.api.common.functions.AbstractRichFunctionpublic void open(org.apache.flink.configuration.Configuration parameters)
throws Exception
open 在接口中 org.apache.flink.api.common.functions.RichFunctionopen 在类中 org.apache.flink.api.common.functions.AbstractRichFunctionExceptionpublic void snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext context)
throws Exception
snapshotState 在接口中 org.apache.flink.streaming.api.checkpoint.CheckpointedFunctionExceptionCopyright © 2023–2024. All rights reserved.