Class SourceRecord
SourceRecord are generated by KNetSourceTask<TTask> and passed to Kafka Connect for storage in Kafka. In addition to the standard fields in ConnectRecord<R, TKey, TValue> which specify where data is stored in Kafka, they also include a sourcePartition and sourceOffset.
public class SourceRecord : ConnectRecord<SourceRecord>, IDynamicMetaObjectProvider, IJVMBridgeCore, IDisposable, IJVMBridgeBaseStatic, IJVMBridgeBase, IJVMBridgeDefinition
- Inheritance
-
JVMBridgeBaseSourceRecord
- Implements
-
IJVMBridgeCoreIJVMBridgeBaseStaticIJVMBridgeBaseIJVMBridgeDefinition
- Inherited Members
-
JVMBridgeBase<ConnectRecord<SourceRecord>>.IsAssignableFrom(IJavaType)JVMBridgeBase<ConnectRecord<SourceRecord>>.IsAssignableFrom<T>()JVMBridgeBase<ConnectRecord<SourceRecord>>.Execute<T>(params T[])JVMBridgeBase<ConnectRecord<SourceRecord>>.DynBridgeClazzJVMBridgeBase<ConnectRecord<SourceRecord>>.BridgeClazzJVMBridgeBase.RuntimeClassNameOf<T>()JVMBridgeBase.ClassNameOf<T>()JVMBridgeBase.ClassOf<T>()JVMBridgeBase.WrapsDirect<TNewClass>(IJavaObject)JVMBridgeBase.Wraps<TNewClass>(IJavaObject)JVMBridgeBase.Wraps<TNewClass, TReturn>(IJavaObject)JVMBridgeBase.Wraps<TNewClass, TReturn, TConverter>(IJavaObject)JVMBridgeBase.MonitorEnter()JVMBridgeBase.MonitorExit()JVMBridgeBase.IsInstanceOf(IJavaType)JVMBridgeBase.IsInstanceOf<T>()JVMBridgeBase.RuntimeIsInstanceOf<T>()JVMBridgeBase.CastTo<TNewClass>()JVMBridgeBase.CastDirect<TNewClass>()JVMBridgeBase.Dispose()JVMBridgeBase.ToString()JVMBridgeBase.GetHashCode()JVMBridgeBase.Notify()JVMBridgeBase.NotifyAll()JVMBridgeBase.Wait()JVMBridgeBase.IExecuteWithSignature<TNewClass, TReturn, TConverter>(string, string, params object[])JVMBridgeBase.DynBridgeInstanceJVMBridgeBase.BridgeInstanceJVMBridgeBase.IsBridgeListener
Constructors
SourceRecord()
Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge
public SourceRecord()
SourceRecord(Map<String, object>, Map<String, object>, String, Integer, Schema, object)
public SourceRecord(Map<String, object> arg0, Map<String, object> arg1, String arg2, Integer arg3, Schema arg4, object arg5)
Parameters
SourceRecord(Map<String, object>, Map<String, object>, String, Integer, Schema, object, Schema, object)
public SourceRecord(Map<String, object> arg0, Map<String, object> arg1, String arg2, Integer arg3, Schema arg4, object arg5, Schema arg6, object arg7)
Parameters
arg0
Map<String, object>arg1
Map<String, object>arg2
Stringarg3
Integerarg4
Schemaarg5
objectarg6
Schemaarg7
object
SourceRecord(Map<String, object>, Map<String, object>, String, Integer, Schema, object, Schema, object, Long)
public SourceRecord(Map<String, object> arg0, Map<String, object> arg1, String arg2, Integer arg3, Schema arg4, object arg5, Schema arg6, object arg7, Long arg8)
Parameters
arg0
Map<String, object>arg1
Map<String, object>arg2
Stringarg3
Integerarg4
Schemaarg5
objectarg6
Schemaarg7
objectarg8
Long
SourceRecord(Map<String, object>, Map<String, object>, String, Integer, Schema, object, Schema, object, Long, Iterable<Header>)
public SourceRecord(Map<String, object> arg0, Map<String, object> arg1, String arg2, Integer arg3, Schema arg4, object arg5, Schema arg6, object arg7, Long arg8, Iterable<Header> arg9)
Parameters
arg0
Map<String, object>arg1
Map<String, object>arg2
Stringarg3
Integerarg4
Schemaarg5
objectarg6
Schemaarg7
objectarg8
Longarg9
Iterable<Header>
SourceRecord(Map<String, object>, Map<String, object>, String, Schema, object)
public SourceRecord(Map<String, object> arg0, Map<String, object> arg1, String arg2, Schema arg3, object arg4)
Parameters
SourceRecord(Map<String, object>, Map<String, object>, String, Schema, object, Schema, object)
public SourceRecord(Map<String, object> arg0, Map<String, object> arg1, String arg2, Schema arg3, object arg4, Schema arg5, object arg6)
Parameters
arg0
Map<String, object>arg1
Map<String, object>arg2
Stringarg3
Schemaarg4
objectarg5
Schemaarg6
object
SourceRecord(params object[])
Generic constructor: it is useful for JCOBridge when there is a derived class which needs to pass arguments to the highest JVMBridgeBase class
public SourceRecord(params object[] args)
Parameters
args
object[]
Properties
BridgeClassName
https://www.jcobridge.com/api-clr/html/P_MASES_JCOBridge_C2JBridge_JVMBridgeBase_BridgeClassName.htm
public override string BridgeClassName { get; }
Property Value
IsBridgeAbstract
public override bool IsBridgeAbstract { get; }
Property Value
IsBridgeCloseable
public override bool IsBridgeCloseable { get; }
Property Value
IsBridgeInterface
public override bool IsBridgeInterface { get; }
Property Value
IsBridgeStatic
public override bool IsBridgeStatic { get; }
Property Value
Methods
CastTo<TKey, TValue>()
Convert to SourceRecord<TKey, TValue>
public SourceRecord<TKey?, TValue?> CastTo<TKey, TValue>()
Returns
- SourceRecord<TKey, TValue>
Type Parameters
TKey
TValue
CastTo<TKeySource, TOffset, TKey, TValue>()
public SourceRecord<TKeySource, TOffset, TKey?, TValue?> CastTo<TKeySource, TOffset, TKey, TValue>()
Returns
- SourceRecord<TKeySource, TOffset, TKey, TValue>
Type Parameters
TKeySource
TOffset
TKey
TValue
New<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, Schema, TKey?, Schema, TValue?)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue>
public static SourceRecord<TKeySource, TOffset, TKey?, TValue?> New<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, Schema keySchema, TKey? key, Schema valueSchema, TValue? value)
Parameters
sourcePartition
Map<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffset
Map<String, TOffset>The parameter represents a position in that
sourcePartition
which can be used to resume consumption of data.topic
stringThe name of the topic; may be null
keySchema
SchemaThe schema for the key; may be null
key
TKeyThe key; may be null
valueSchema
SchemaThe schema for the value; may be null
value
TValueThe value; may be null
Returns
- SourceRecord<TKeySource, TOffset, TKey, TValue>
A newvly allocated SourceRecord<TKey, TValue>
Type Parameters
TKeySource
The value type of source partition Map<K, V> in
sourcePartition
TOffset
The value type of source offset Map<K, V> in
sourceOffset
TKey
TValue
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.
New<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, Schema, TValue?)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue>
public static SourceRecord<TKeySource, TOffset, TKey?, TValue?> New<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, Schema valueSchema, TValue? value)
Parameters
sourcePartition
Map<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffset
Map<String, TOffset>The parameter represents a position in that
sourcePartition
which can be used to resume consumption of data.topic
stringThe name of the topic; may be null
valueSchema
SchemaThe schema for the value; may be null
value
TValueThe value; may be null
Returns
- SourceRecord<TKeySource, TOffset, TKey, TValue>
A newvly allocated SourceRecord<TKey, TValue>
Type Parameters
TKeySource
The value type of source partition Map<K, V> in
sourcePartition
TOffset
The value type of source offset Map<K, V> in
sourceOffset
TKey
TValue
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.
New<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 static SourceRecord<TKeySource, TOffset, TKey?, TValue?> New<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
sourcePartition
Map<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffset
Map<String, TOffset>The parameter represents a position in that
sourcePartition
which can be used to resume consumption of data.topic
stringThe name of the topic; may be null
partition
int?The partition number for the Kafka topic; may be null
keySchema
SchemaThe schema for the key; may be null
key
TKeyThe key; may be null
valueSchema
SchemaThe schema for the value; may be null
value
TValueThe value; may be null
Returns
- SourceRecord<TKeySource, TOffset, TKey, TValue>
A newvly allocated SourceRecord<TKey, TValue>
Type Parameters
TKeySource
The value type of source partition Map<K, V> in
sourcePartition
TOffset
The value type of source offset Map<K, V> in
sourceOffset
TKey
TValue
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.
New<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 static SourceRecord<TKeySource, TOffset, TKey?, TValue?> New<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
sourcePartition
Map<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffset
Map<String, TOffset>The parameter represents a position in that
sourcePartition
which can be used to resume consumption of data.topic
stringThe name of the topic; may be null
partition
int?The partition number for the Kafka topic; may be null
keySchema
SchemaThe schema for the key; may be null
key
TKeyThe key; may be null
valueSchema
SchemaThe schema for the value; may be null
value
TValueThe value; may be null
timestamp
DateTimeThe timestamp; may be null
Returns
- SourceRecord<TKeySource, TOffset, TKey, TValue>
A newvly allocated SourceRecord<TKey, TValue>
Type Parameters
TKeySource
The value type of source partition Map<K, V> in
sourcePartition
TOffset
The value type of source offset Map<K, V> in
sourceOffset
TKey
TValue
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.
New<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 static SourceRecord<TKeySource, TOffset, TKey?, TValue?> New<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
sourcePartition
Map<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffset
Map<String, TOffset>The parameter represents a position in that
sourcePartition
which can be used to resume consumption of data.topic
stringThe name of the topic; may be null
partition
int?The partition number for the Kafka topic; may be null
keySchema
SchemaThe schema for the key; may be null
key
TKeyThe key; may be null
valueSchema
SchemaThe schema for the value; may be null
value
TValueThe value; may be null
timestamp
DateTimeThe timestamp; may be null
headers
HeadersThe Headerss; may be null or empty
Returns
- SourceRecord<TKeySource, TOffset, TKey, TValue>
A newvly allocated SourceRecord<TKey, TValue>
Type Parameters
TKeySource
The value type of source partition Map<K, V> in
sourcePartition
TOffset
The value type of source offset Map<K, V> in
sourceOffset
TKey
TValue
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.
New<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource>, Map<String, TOffset>, string, int?, Schema, TValue?)
Creates a new SourceRecord<TKeySource, TOffset, TKey, TValue>
public static SourceRecord<TKeySource, TOffset, TKey?, TValue?> New<TKeySource, TOffset, TKey, TValue>(Map<String, TKeySource> sourcePartition, Map<String, TOffset> sourceOffset, string topic, int? partition, Schema valueSchema, TValue? value)
Parameters
sourcePartition
Map<String, TKeySource>The parameter represents a single input sourcePartition that the record came from (e.g. a filename, table name, or topic-partition).
sourceOffset
Map<String, TOffset>The parameter represents a position in that
sourcePartition
which can be used to resume consumption of data.topic
stringThe name of the topic; may be null
partition
int?The partition number for the Kafka topic; may be null
valueSchema
SchemaThe schema for the value; may be null
value
TValueThe value; may be null
Returns
- SourceRecord<TKeySource, TOffset, TKey, TValue>
A newvly allocated SourceRecord<TKey, TValue>
Type Parameters
TKeySource
The value type of source partition Map<K, V> in
sourcePartition
TOffset
The value type of source offset Map<K, V> in
sourceOffset
TKey
TValue
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.
SourceOffset()
public Map<String, object> SourceOffset()
Returns
SourcePartition()
public Map<String, object> SourcePartition()