Class SourceRecord<TKeySource, TOffset, TKey, TValue>
SourceRecord<TKey, TValue> 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<TKeySource, TOffset, TKey, TValue> : ConnectRecord<SourceRecord<TKey?, TValue?>, TKey?, TValue?>, IDynamicMetaObjectProvider, IJVMBridgeCore, IDisposable, IJVMBridgeBaseStatic, IJVMBridgeBase, IJVMBridgeDefinition
Type Parameters
TKeySource
The value type of source partition Map<K, V> in the sourcePartition parameters
TOffset
The value type of source offset Map<K, V> in the sourceOffset parameters
TKey
The type of the key to be inserted in Kafka
TValue
The type of value to be inserted in Kafka
- Inheritance
-
JVMBridgeBaseConnectRecord<SourceRecord<TKey, TValue>, TKey, TValue>SourceRecord<TKeySource, TOffset, TKey, TValue>
- Implements
-
IJVMBridgeCoreIJVMBridgeBaseStaticIJVMBridgeBaseIJVMBridgeDefinition
- Derived
-
SourceRecord<TKey, TValue>
- Inherited Members
-
JVMBridgeBase<ConnectRecord<SourceRecord<TKey, TValue>, TKey, TValue>>.IsAssignableFrom(IJavaType)JVMBridgeBase<ConnectRecord<SourceRecord<TKey, TValue>, TKey, TValue>>.IsAssignableFrom<T>()JVMBridgeBase<ConnectRecord<SourceRecord<TKey, TValue>, TKey, TValue>>.Execute<T>(params T[])JVMBridgeBase<ConnectRecord<SourceRecord<TKey, TValue>, TKey, TValue>>.DynBridgeClazzJVMBridgeBase<ConnectRecord<SourceRecord<TKey, TValue>, TKey, TValue>>.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.Execute<T>(params T[])JVMBridgeBase.Dispose()JVMBridgeBase.ToString()JVMBridgeBase.GetHashCode()JVMBridgeBase.Notify()JVMBridgeBase.NotifyAll()JVMBridgeBase.Wait()JVMBridgeBase.IExecuteWithSignature<TNewClass, TReturn, TConverter>(string, string, params object[])JVMBridgeBase.DynBridgeInstanceJVMBridgeBase.BridgeInstanceJVMBridgeBase.IsBridgeInterfaceJVMBridgeBase.IsBridgeStaticJVMBridgeBase.IsBridgeCloseableJVMBridgeBase.IsBridgeListener
- Extension Methods
Constructors
SourceRecord(Map<String, TKeySource>, Map<String, TOffset>, string, Schema, TKey?, Schema, TValue?)
Creates a new SourceRecord<TKey, TValue>
public SourceRecord(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
SourceRecord(Map<String, TKeySource>, Map<String, TOffset>, string, Schema, TValue?)
Creates a new SourceRecord<TKey, TValue>
public SourceRecord(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
SourceRecord(Map<String, TKeySource>, Map<String, TOffset>, string, int?, Schema, TKey?, Schema, TValue?)
Creates a new SourceRecord<TKey, TValue>
public SourceRecord(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
SourceRecord(Map<String, TKeySource>, Map<String, TOffset>, string, int?, Schema, TKey?, Schema, TValue?, DateTime)
Creates a new SourceRecord<TKey, TValue>
public SourceRecord(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
SourceRecord(Map<String, TKeySource>, Map<String, TOffset>, string, int?, Schema, TKey?, Schema, TValue?, DateTime, Headers)
Creates a new SourceRecord<TKey, TValue>
public SourceRecord(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
SourceRecord(Map<String, TKeySource>, Map<String, TOffset>, string, int?, Schema, TValue?)
Creates a new SourceRecord<TKey, TValue>
public SourceRecord(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
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
SourceOffset
The source offset
public Map<String, TOffset> SourceOffset { get; }
Property Value
SourcePartition
The source partition
public Map<String, TKeySource> SourcePartition { get; }
Property Value
Operators
implicit operator SourceRecord(SourceRecord<TKeySource, TOffset, TKey?, TValue?>)
Converts an SourceRecord<TKeySource, TOffset, TKey, TValue> in SourceRecord
public static implicit operator SourceRecord(SourceRecord<TKeySource, TOffset, TKey?, TValue?> source)
Parameters
source
SourceRecord<TKeySource, TOffset, TKey, TValue>The SourceRecord<TKeySource, TOffset, TKey, TValue> to convert