Class KNetSourceTask<TTask>
An implementation of KNetTask<TTask> for source task
public abstract class KNetSourceTask<TTask> : KNetTask<TTask>, IKNetTask, ITask, IKNetConnectLogging where TTask : KNetSourceTask<TTask>
Type Parameters
TTaskThe class which extends KNetSourceTask<TTask>
- Inheritance
-
KNetTask<TTask>KNetSourceTask<TTask>
- Implements
- Derived
- Inherited Members
Properties
Context
public SourceTaskContext Context { get; }
Property Value
ReflectedTaskClassName
Set the ReflectedTaskClassName of the connector to a fixed value
public override string ReflectedTaskClassName { get; }
Property Value
Methods
CreateAndPushRecord<TValue>(string, Schema, TValue, DateTime)
Creates a new SourceRecord<TKey, TValue> and push it to JVM
public void CreateAndPushRecord<TValue>(string topic, Schema valueSchema, TValue value, DateTime timestamp)
Parameters
topicstringThe name of the topic; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
timestampDateTimeThe timestamp; may be null
Type Parameters
TValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
CreateAndPushRecord<TValue>(string, int?, Schema, TValue, DateTime)
Creates a new SourceRecord<TKey, TValue> and push it to JVM
public void CreateAndPushRecord<TValue>(string topic, int? partition, Schema valueSchema, TValue value, DateTime timestamp)
Parameters
topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
timestampDateTimeThe timestamp; may be null
Type Parameters
TValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
CreateAndPushRecord<TKey, TValue>(string, Schema, TKey, Schema, TValue)
Creates a new SourceRecord<TKey, TValue> and push it to JVM
public void CreateAndPushRecord<TKey, TValue>(string topic, Schema keySchema, TKey key, Schema valueSchema, TValue value)
Parameters
topicstringThe name of the topic; may be null
keySchemaSchemaThe schema for the key; may be null
keyTKeyThe key; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
Type Parameters
TKeyThe type of the key to be inserted in Kafka
TValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
CreateAndPushRecord<TKey, TValue>(string, Schema, TValue)
Creates a new SourceRecord<TKey, TValue> and push it to JVM
public void CreateAndPushRecord<TKey, TValue>(string topic, Schema valueSchema, TValue value)
Parameters
topicstringThe name of the topic; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
Type Parameters
TKeyThe type of the key to be inserted in Kafka
TValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
CreateAndPushRecord<TKey, TValue>(string, int?, Schema, TKey, Schema, TValue)
Creates a new SourceRecord<TKey, TValue> and push it to JVM
public void CreateAndPushRecord<TKey, TValue>(string topic, int? partition, Schema keySchema, TKey key, Schema valueSchema, TValue value)
Parameters
topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
keySchemaSchemaThe schema for the key; may be null
keyTKeyThe key; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
Type Parameters
TKeyThe type of the key to be inserted in Kafka
TValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
CreateAndPushRecord<TKey, TValue>(string, int?, Schema, TKey, Schema, TValue, DateTime)
Creates a new SourceRecord<TKey, TValue> and push it to JVM
public void CreateAndPushRecord<TKey, TValue>(string topic, int? partition, Schema keySchema, TKey key, Schema valueSchema, TValue value, DateTime timestamp)
Parameters
topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
keySchemaSchemaThe schema for the key; may be null
keyTKeyThe key; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
timestampDateTimeThe timestamp; may be null
Type Parameters
TKeyThe type of the key to be inserted in Kafka
TValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
CreateAndPushRecord<TKey, TValue>(string, int?, Schema, TKey, Schema, TValue, DateTime, Headers)
Creates a new SourceRecord<TKey, TValue> and push it to JVM
public void CreateAndPushRecord<TKey, TValue>(string topic, int? partition, Schema keySchema, TKey key, Schema valueSchema, TValue value, DateTime timestamp, Headers headers)
Parameters
topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
keySchemaSchemaThe schema for the key; may be null
keyTKeyThe key; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
timestampDateTimeThe timestamp; may be null
headersHeadersThe Headerss; may be null or empty
Type Parameters
TKeyThe type of the key to be inserted in Kafka
TValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
CreateAndPushRecord<TKey, TValue>(string, int?, Schema, TValue)
Creates a new SourceRecord<TKey, TValue> and push it to JVM
public void CreateAndPushRecord<TKey, TValue>(string topic, int? partition, Schema valueSchema, TValue value)
Parameters
topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
Type Parameters
TKeyThe type of the key to be inserted in Kafka
TValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
CreateAndPushRecord<TKeySource, TOffset, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, Schema, TValue, DateTime)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue> and push it to JVM
public void CreateAndPushRecord<TKeySource, TOffset, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, Schema valueSchema, TValue value, DateTime timestamp)
Parameters
sourcePartitionMap<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffsetMap<String, TOffset>The parameter represents a position in that
sourcePartitionwhich can be used to resume consumption of data.topicstringThe name of the topic; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
timestampDateTimeThe timestamp; may be null
Type Parameters
TKeySourceThe type within Map<K, V> of
sourcePartitionTOffsetThe type within Map<K, V> of
sourceOffsetTValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
For example, a database connector might specify the sourcePartition as a record containing { "db": "database_name", "table": "table_name"} and the sourceOffset as a long containing the timestamp of the row.
CreateAndPushRecord<TKeySource, TOffset, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, int?, Schema, TValue, DateTime)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue> and push it to JVM
public void CreateAndPushRecord<TKeySource, TOffset, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, int? partition, Schema valueSchema, TValue value, DateTime timestamp)
Parameters
sourcePartitionMap<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffsetMap<String, TOffset>The parameter represents a position in that
sourcePartitionwhich can be used to resume consumption of data.topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
timestampDateTimeThe timestamp; may be null
Type Parameters
TKeySourceThe type within Map<K, V> of
sourcePartitionTOffsetThe type within Map<K, V> of
sourceOffsetTValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
For example, a database connector might specify the sourcePartition as a record containing { "db": "database_name", "table": "table_name"} and the sourceOffset as a long containing the timestamp of the row.
CreateAndPushRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, Schema, TKey, Schema, TValue)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue> and push it to JVM
public void CreateAndPushRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, Schema keySchema, TKey key, Schema valueSchema, TValue value)
Parameters
sourcePartitionMap<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffsetMap<String, TOffset>The parameter represents a position in that
sourcePartitionwhich can be used to resume consumption of data.topicstringThe name of the topic; may be null
keySchemaSchemaThe schema for the key; may be null
keyTKeyThe key; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
Type Parameters
TKeySourceThe type within Map<K, V> of
sourcePartitionTOffsetThe type within Map<K, V> of
sourceOffsetTKeyThe type within Map<K, V> of
sourcePartitionTValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
For example, a database connector might specify the sourcePartition as a record containing { "db": "database_name", "table": "table_name"} and the sourceOffset as a long containing the timestamp of the row.
CreateAndPushRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, Schema, TValue)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue> and push it to JVM
public void CreateAndPushRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, Schema valueSchema, TValue value)
Parameters
sourcePartitionMap<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffsetMap<String, TOffset>The parameter represents a position in that
sourcePartitionwhich can be used to resume consumption of data.topicstringThe name of the topic; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
Type Parameters
TKeySourceThe type within Map<K, V> of
sourcePartitionTOffsetThe type within Map<K, V> of
sourceOffsetTKeyThe type within Map<K, V> of
sourcePartitionTValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
For example, a database connector might specify the sourcePartition as a record containing { "db": "database_name", "table": "table_name"} and the sourceOffset as a long containing the timestamp of the row.
CreateAndPushRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, int?, Schema, TKey, Schema, TValue)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue> and push it to JVM
public void CreateAndPushRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, int? partition, Schema keySchema, TKey key, Schema valueSchema, TValue value)
Parameters
sourcePartitionMap<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffsetMap<String, TOffset>The parameter represents a position in that
sourcePartitionwhich can be used to resume consumption of data.topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
keySchemaSchemaThe schema for the key; may be null
keyTKeyThe key; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
Type Parameters
TKeySourceThe type within Map<K, V> of
sourcePartitionTOffsetThe type within Map<K, V> of
sourceOffsetTKeyThe type within Map<K, V> of
sourcePartitionTValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
For example, a database connector might specify the sourcePartition as a record containing { "db": "database_name", "table": "table_name"} and the sourceOffset as a long containing the timestamp of the row.
CreateAndPushRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, int?, Schema, TKey, Schema, TValue, DateTime)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue> and push it to JVM
public void CreateAndPushRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, int? partition, Schema keySchema, TKey key, Schema valueSchema, TValue value, DateTime timestamp)
Parameters
sourcePartitionMap<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffsetMap<String, TOffset>The parameter represents a position in that
sourcePartitionwhich can be used to resume consumption of data.topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
keySchemaSchemaThe schema for the key; may be null
keyTKeyThe key; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
timestampDateTimeThe timestamp; may be null
Type Parameters
TKeySourceThe type within Map<K, V> of
sourcePartitionTOffsetThe type within Map<K, V> of
sourceOffsetTKeyThe type within Map<K, V> of
sourcePartitionTValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
For example, a database connector might specify the sourcePartition as a record containing { "db": "database_name", "table": "table_name"} and the sourceOffset as a long containing the timestamp of the row.
CreateAndPushRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, int?, Schema, TKey, Schema, TValue, DateTime, Headers)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue> and push it to JVM
public void CreateAndPushRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, int? partition, Schema keySchema, TKey key, Schema valueSchema, TValue value, DateTime timestamp, Headers headers)
Parameters
sourcePartitionMap<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffsetMap<String, TOffset>The parameter represents a position in that
sourcePartitionwhich can be used to resume consumption of data.topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
keySchemaSchemaThe schema for the key; may be null
keyTKeyThe key; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
timestampDateTimeThe timestamp; may be null
headersHeadersThe Headerss; may be null or empty
Type Parameters
TKeySourceThe type within Map<K, V> of
sourcePartitionTOffsetThe type within Map<K, V> of
sourceOffsetTKeyThe type within Map<K, V> of
sourcePartitionTValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
For example, a database connector might specify the sourcePartition as a record containing { "db": "database_name", "table": "table_name"} and the sourceOffset as a long containing the timestamp of the row.
CreateAndPushRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, int?, Schema, TValue)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue> and push it to JVM
public void CreateAndPushRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, int? partition, Schema valueSchema, TValue value)
Parameters
sourcePartitionMap<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffsetMap<String, TOffset>The parameter represents a position in that
sourcePartitionwhich can be used to resume consumption of data.topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
Type Parameters
TKeySourceThe type within Map<K, V> of
sourcePartitionTOffsetThe type within Map<K, V> of
sourceOffsetTKeyThe type of the key to be inserted in Kafka
TValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
For example, a database connector might specify the sourcePartition as a record containing { "db": "database_name", "table": "table_name"} and the sourceOffset as a long containing the timestamp of the row.
CreateRecord<TValue>(string, Schema, TValue, DateTime)
Creates a new SourceRecord<TKey, TValue>
public SourceRecord<object, TValue> CreateRecord<TValue>(string topic, Schema valueSchema, TValue value, DateTime timestamp)
Parameters
topicstringThe name of the topic; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
timestampDateTimeThe timestamp; may be null
Returns
- SourceRecord<object, TValue>
A newvly allocated SourceRecord<TKey, TValue>
Type Parameters
TValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
CreateRecord<TValue>(string, int?, Schema, TValue, DateTime)
Creates a new SourceRecord<TKey, TValue>
public SourceRecord<object, TValue> CreateRecord<TValue>(string topic, int? partition, Schema valueSchema, TValue value, DateTime timestamp)
Parameters
topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
timestampDateTimeThe timestamp; may be null
Returns
- SourceRecord<object, TValue>
A newvly allocated SourceRecord<TKey, TValue>
Type Parameters
TValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
CreateRecord<TKey, TValue>(string, Schema, TKey, Schema, TValue)
Creates a new SourceRecord<TKey, TValue>
public SourceRecord<TKey, TValue> CreateRecord<TKey, TValue>(string topic, Schema keySchema, TKey key, Schema valueSchema, TValue value)
Parameters
topicstringThe name of the topic; may be null
keySchemaSchemaThe schema for the key; may be null
keyTKeyThe key; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
Returns
- SourceRecord<TKey, TValue>
A newvly allocated SourceRecord<TKey, TValue>
Type Parameters
TKeyThe type of the key to be inserted in Kafka
TValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
CreateRecord<TKey, TValue>(string, Schema, TValue)
Creates a new SourceRecord<TKey, TValue>
public SourceRecord<TKey, TValue> CreateRecord<TKey, TValue>(string topic, Schema valueSchema, TValue value)
Parameters
topicstringThe name of the topic; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
Returns
- SourceRecord<TKey, TValue>
A newvly allocated SourceRecord<TKey, TValue>
Type Parameters
TKeyThe type of the key to be inserted in Kafka
TValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
CreateRecord<TKey, TValue>(string, int?, Schema, TKey, Schema, TValue)
Creates a new SourceRecord<TKey, TValue>
public SourceRecord<TKey, TValue> CreateRecord<TKey, TValue>(string topic, int? partition, Schema keySchema, TKey key, Schema valueSchema, TValue value)
Parameters
topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
keySchemaSchemaThe schema for the key; may be null
keyTKeyThe key; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
Returns
- SourceRecord<TKey, TValue>
A newvly allocated SourceRecord<TKey, TValue>
Type Parameters
TKeyThe type of the key to be inserted in Kafka
TValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
CreateRecord<TKey, TValue>(string, int?, Schema, TKey, Schema, TValue, DateTime)
Creates a new SourceRecord<TKey, TValue>
public SourceRecord<TKey, TValue> CreateRecord<TKey, TValue>(string topic, int? partition, Schema keySchema, TKey key, Schema valueSchema, TValue value, DateTime timestamp)
Parameters
topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
keySchemaSchemaThe schema for the key; may be null
keyTKeyThe key; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
timestampDateTimeThe timestamp; may be null
Returns
- SourceRecord<TKey, TValue>
A newvly allocated SourceRecord<TKey, TValue>
Type Parameters
TKeyThe type of the key to be inserted in Kafka
TValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
CreateRecord<TKey, TValue>(string, int?, Schema, TKey, Schema, TValue, DateTime, Headers)
Creates a new SourceRecord<TKey, TValue>
public SourceRecord<TKey, TValue> CreateRecord<TKey, TValue>(string topic, int? partition, Schema keySchema, TKey key, Schema valueSchema, TValue value, DateTime timestamp, Headers headers)
Parameters
topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
keySchemaSchemaThe schema for the key; may be null
keyTKeyThe key; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
timestampDateTimeThe timestamp; may be null
headersHeadersThe Headerss; may be null or empty
Returns
- SourceRecord<TKey, TValue>
A newvly allocated SourceRecord<TKey, TValue>
Type Parameters
TKeyThe type of the key to be inserted in Kafka
TValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
CreateRecord<TKey, TValue>(string, int?, Schema, TValue)
Creates a new SourceRecord<TKey, TValue>
public SourceRecord<TKey, TValue> CreateRecord<TKey, TValue>(string topic, int? partition, Schema valueSchema, TValue value)
Parameters
topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
Returns
- SourceRecord<TKey, TValue>
A newvly allocated SourceRecord<TKey, TValue>
Type Parameters
TKeyThe type of the key to be inserted in Kafka
TValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
CreateRecord<TKeySource, TOffset, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, Schema, TValue, DateTime)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue>
public SourceRecord<TKeySource, TOffset, object, TValue> CreateRecord<TKeySource, TOffset, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, Schema valueSchema, TValue value, DateTime timestamp)
Parameters
sourcePartitionMap<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffsetMap<String, TOffset>The parameter represents a position in that
sourcePartitionwhich can be used to resume consumption of data.topicstringThe name of the topic; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
timestampDateTimeThe timestamp; may be null
Returns
- SourceRecord<TKeySource, TOffset, object, TValue>
A newvly allocated SourceRecord<TKeySource, TOffset, TKey, TValue>
Type Parameters
TKeySourceThe type within Map<K, V> of
sourcePartitionTOffsetThe type within Map<K, V> of
sourceOffsetTValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
For example, a database connector might specify the sourcePartition as a record containing { "db": "database_name", "table": "table_name"} and the sourceOffset as a long containing the timestamp of the row.
CreateRecord<TKeySource, TOffset, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, int?, Schema, TValue, DateTime)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue>
public SourceRecord<TKeySource, TOffset, object, TValue> CreateRecord<TKeySource, TOffset, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, int? partition, Schema valueSchema, TValue value, DateTime timestamp)
Parameters
sourcePartitionMap<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffsetMap<String, TOffset>The parameter represents a position in that
sourcePartitionwhich can be used to resume consumption of data.topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
timestampDateTimeThe timestamp; may be null
Returns
- SourceRecord<TKeySource, TOffset, object, TValue>
A newvly allocated SourceRecord<TKeySource, TOffset, TKey, TValue>
Type Parameters
TKeySourceThe type within Map<K, V> of
sourcePartitionTOffsetThe type within Map<K, V> of
sourceOffsetTValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
For example, a database connector might specify the sourcePartition as a record containing { "db": "database_name", "table": "table_name"} and the sourceOffset as a long containing the timestamp of the row.
CreateRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, Schema, TKey, Schema, TValue)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue>
public SourceRecord<TKeySource, TOffset, TKey, TValue> CreateRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, Schema keySchema, TKey key, Schema valueSchema, TValue value)
Parameters
sourcePartitionMap<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffsetMap<String, TOffset>The parameter represents a position in that
sourcePartitionwhich can be used to resume consumption of data.topicstringThe name of the topic; may be null
keySchemaSchemaThe schema for the key; may be null
keyTKeyThe key; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
Returns
- SourceRecord<TKeySource, TOffset, TKey, TValue>
A newvly allocated SourceRecord<TKeySource, TOffset, TKey, TValue>
Type Parameters
TKeySourceThe type within Map<K, V> of
sourcePartitionTOffsetThe type within Map<K, V> of
sourceOffsetTKeyThe type within Map<K, V> of
sourcePartitionTValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
For example, a database connector might specify the sourcePartition as a record containing { "db": "database_name", "table": "table_name"} and the sourceOffset as a long containing the timestamp of the row.
CreateRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, Schema, TValue)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue>
public SourceRecord<TKeySource, TOffset, TKey, TValue> CreateRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, Schema valueSchema, TValue value)
Parameters
sourcePartitionMap<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffsetMap<String, TOffset>The parameter represents a position in that
sourcePartitionwhich can be used to resume consumption of data.topicstringThe name of the topic; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
Returns
- SourceRecord<TKeySource, TOffset, TKey, TValue>
A newvly allocated SourceRecord<TKeySource, TOffset, TKey, TValue>
Type Parameters
TKeySourceThe type within Map<K, V> of
sourcePartitionTOffsetThe type within Map<K, V> of
sourceOffsetTKeyThe type within Map<K, V> of
sourcePartitionTValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
For example, a database connector might specify the sourcePartition as a record containing { "db": "database_name", "table": "table_name"} and the sourceOffset as a long containing the timestamp of the row.
CreateRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, int?, Schema, TKey, Schema, TValue)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue>
public SourceRecord<TKeySource, TOffset, TKey, TValue> CreateRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, int? partition, Schema keySchema, TKey key, Schema valueSchema, TValue value)
Parameters
sourcePartitionMap<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffsetMap<String, TOffset>The parameter represents a position in that
sourcePartitionwhich can be used to resume consumption of data.topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
keySchemaSchemaThe schema for the key; may be null
keyTKeyThe key; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
Returns
- SourceRecord<TKeySource, TOffset, TKey, TValue>
A newvly allocated SourceRecord<TKeySource, TOffset, TKey, TValue>
Type Parameters
TKeySourceThe type within Map<K, V> of
sourcePartitionTOffsetThe type within Map<K, V> of
sourceOffsetTKeyThe type within Map<K, V> of
sourcePartitionTValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
For example, a database connector might specify the sourcePartition as a record containing { "db": "database_name", "table": "table_name"} and the sourceOffset as a long containing the timestamp of the row.
CreateRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, int?, Schema, TKey, Schema, TValue, DateTime)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue>
public SourceRecord<TKeySource, TOffset, TKey, TValue> CreateRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, int? partition, Schema keySchema, TKey key, Schema valueSchema, TValue value, DateTime timestamp)
Parameters
sourcePartitionMap<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffsetMap<String, TOffset>The parameter represents a position in that
sourcePartitionwhich can be used to resume consumption of data.topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
keySchemaSchemaThe schema for the key; may be null
keyTKeyThe key; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
timestampDateTimeThe timestamp; may be null
Returns
- SourceRecord<TKeySource, TOffset, TKey, TValue>
A newvly allocated SourceRecord<TKeySource, TOffset, TKey, TValue>
Type Parameters
TKeySourceThe type within Map<K, V> of
sourcePartitionTOffsetThe type within Map<K, V> of
sourceOffsetTKeyThe type within Map<K, V> of
sourcePartitionTValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
For example, a database connector might specify the sourcePartition as a record containing { "db": "database_name", "table": "table_name"} and the sourceOffset as a long containing the timestamp of the row.
CreateRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, int?, Schema, TKey, Schema, TValue, DateTime, Headers)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue>
public SourceRecord<TKeySource, TOffset, TKey, TValue> CreateRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, int? partition, Schema keySchema, TKey key, Schema valueSchema, TValue value, DateTime timestamp, Headers headers)
Parameters
sourcePartitionMap<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffsetMap<String, TOffset>The parameter represents a position in that
sourcePartitionwhich can be used to resume consumption of data.topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
keySchemaSchemaThe schema for the key; may be null
keyTKeyThe key; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
timestampDateTimeThe timestamp; may be null
headersHeadersThe Headerss; may be null or empty
Returns
- SourceRecord<TKeySource, TOffset, TKey, TValue>
A newvly allocated SourceRecord<TKeySource, TOffset, TKey, TValue>
Type Parameters
TKeySourceThe type within Map<K, V> of
sourcePartitionTOffsetThe type within Map<K, V> of
sourceOffsetTKeyThe type within Map<K, V> of
sourcePartitionTValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
For example, a database connector might specify the sourcePartition as a record containing { "db": "database_name", "table": "table_name"} and the sourceOffset as a long containing the timestamp of the row.
CreateRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, int?, Schema, TValue)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue>
public SourceRecord<TKeySource, TOffset, TKey, TValue> CreateRecord<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, int? partition, Schema valueSchema, TValue value)
Parameters
sourcePartitionMap<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffsetMap<String, TOffset>The parameter represents a position in that
sourcePartitionwhich can be used to resume consumption of data.topicstringThe name of the topic; may be null
partitionint?The partition number for the Kafka topic; may be null
valueSchemaSchemaThe schema for the value; may be null
valueTValueThe value; may be null
Returns
- SourceRecord<TKeySource, TOffset, TKey, TValue>
A newvly allocated SourceRecord<TKeySource, TOffset, TKey, TValue>
Type Parameters
TKeySourceThe type within Map<K, V> of
sourcePartitionTOffsetThe type within Map<K, V> of
sourceOffsetTKeyThe type of the key to be inserted in Kafka
TValueThe type of value to be inserted in Kafka
Remarks
These values can have arbitrary structure and should be represented using Org.Apache.Kafka.Connect.Data.* objects (or primitive values).
For example, a database connector might specify the sourcePartition as a record containing { "db": "database_name", "table": "table_name"} and the sourceOffset as a long containing the timestamp of the row.
OffsetAt<TKeySource, TOffset>(String, TKeySource)
Get the offset for the specified partition. If the data isn't already available locally, this gets it from the backing store, which may require some network round trips.
protected Map<String, TOffset> OffsetAt<TKeySource, TOffset>(String keyName, TKeySource keyValue)
Parameters
keyNameStringThe identifier used when was called OffsetForKey<T>(String, T)
keyValueTKeySourceThe value used when was called OffsetForKey<T>(String, T)
Returns
- Map<String, TOffset>
Return the Map<K, V> associated to the element identified from
keyNameandkeyValuewhich is an object uniquely identifying the offset in the partition of data
Type Parameters
TKeySourceThe type of the key set when was called OffsetForKey<T>(String, T) to generated first parameter of SourceRecord
TOffsetThe type of the offset set when was called OffsetForKey<T>(String, T) to generated second parameter of SourceRecord
OffsetForKey<T>(String, T)
Generates a Map<K, V> to be used in SourceRecord
protected Map<String, T> OffsetForKey<T>(String identifier, T value)
Parameters
identifierStringThe identifier to be associated in first, or second, parameter of a SourceRecord
valueTThe value to be inserted and associated to the
identifier
Returns
Type Parameters
TThe
identifiertype
Poll()
Implement the method to execute the Poll action
public abstract IList<SourceRecord> Poll()
Returns
- IList<SourceRecord>
The list of SourceRecord to return to Apache Kafka Connect framework
PollInternal()
Public method used from Java to trigger Poll()
public void PollInternal()