Package org.apache.pulsar.io.jdbc
Class JdbcAbstractSink<T>
java.lang.Object
org.apache.pulsar.io.jdbc.JdbcAbstractSink<T>
- All Implemented Interfaces:
AutoCloseable
,Sink<T>
- Direct Known Subclasses:
BaseJdbcAutoSchemaSink
A Simple abstract class for Jdbc sink.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
protected static enum
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected JdbcSinkConfig
protected JdbcUtils.TableDefinition
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
bindValue
(PreparedStatement statement, JdbcAbstractSink.Mutation mutation) void
close()
abstract JdbcAbstractSink.Mutation
createMutation
(org.apache.pulsar.functions.api.Record<T> message) abstract String
abstract List<JdbcUtils.ColumnId>
void
open
(Map<String, Object> config, SinkContext sinkContext) void
-
Field Details
-
jdbcSinkConfig
-
ACTION_PROPERTY
- See Also:
-
tableDefinition
-
-
Constructor Details
-
JdbcAbstractSink
public JdbcAbstractSink()
-
-
Method Details
-
open
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
write
-
generateInsertQueryStatement
-
generateUpdateQueryStatement
-
generateUpsertQueryStatement
-
getColumnsForUpsert
-
generateDeleteQueryStatement
-
bindValue
public abstract void bindValue(PreparedStatement statement, JdbcAbstractSink.Mutation mutation) throws Exception - Throws:
Exception
-
createMutation
public abstract JdbcAbstractSink.Mutation createMutation(org.apache.pulsar.functions.api.Record<T> message)
-