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, IEquatable<IJVMBridgeBase>, IDisposable, IJVMBridgeBaseStatic, IJVMBridgeBase, IJVMBridgeDefinition
  - Inheritance
 - 
      
      
      
      
      
      SourceRecord
 
- Implements
 
- Inherited Members
 
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
arg0Map<String, object>arg1Map<String, object>arg2Stringarg3Integerarg4Schemaarg5objectarg6Schemaarg7object
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
arg0Map<String, object>arg1Map<String, object>arg2Stringarg3Integerarg4Schemaarg5objectarg6Schemaarg7objectarg8Long
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
arg0Map<String, object>arg1Map<String, object>arg2Stringarg3Integerarg4Schemaarg5objectarg6Schemaarg7objectarg8Longarg9Iterable<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
arg0Map<String, object>arg1Map<String, object>arg2Stringarg3Schemaarg4objectarg5Schemaarg6object
SourceRecord(IJVMBridgeBaseInitializer)
Internal constructor: used internally from JCOBridge
[Obsolete("This public initializer is needed for JCOBridge internal use, other uses can produce unidentible behaviors.")]
public SourceRecord(IJVMBridgeBaseInitializer initializer)
  Parameters
initializerIJVMBridgeBaseInitializer
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
argsobject[]
Properties
BridgeClassName
Java class name to be instantiated
public override string BridgeClassName { get; }
  Property Value
IsBridgeAbstract
true if the BridgeClassName is an abstract class, i.e. cannot be created an instance
public override bool IsBridgeAbstract { get; }
  Property Value
IsBridgeCloseable
true if the BridgeClassName implements Closeable
public override bool IsBridgeCloseable { get; }
  Property Value
IsBridgeInterface
true if the BridgeClassName is an interface, i.e. does not have any public constructor
public override bool IsBridgeInterface { get; }
  Property Value
IsBridgeStatic
true if the BridgeClassName is a static class, i.e. does not have any public constructor
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
TKeyTValue
CastTo<TKeySource, TOffset, TKey, TValue>()
public SourceRecord<TKeySource, TOffset, TKey?, TValue?> CastTo<TKeySource, TOffset, TKey, TValue>()
  Returns
- SourceRecord<TKeySource, TOffset, TKey, TValue>
 
Type Parameters
TKeySourceTOffsetTKeyTValue
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
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<TKey, TValue>
Type Parameters
TKeySourceThe value type of source partition Map<K, V> in
sourcePartitionTOffsetThe value type of source offset Map<K, V> in
sourceOffsetTKeyTValue
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
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<TKey, TValue>
Type Parameters
TKeySourceThe value type of source partition Map<K, V> in
sourcePartitionTOffsetThe value type of source offset Map<K, V> in
sourceOffsetTKeyTValue
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
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<TKey, TValue>
Type Parameters
TKeySourceThe value type of source partition Map<K, V> in
sourcePartitionTOffsetThe value type of source offset Map<K, V> in
sourceOffsetTKeyTValue
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
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<TKey, TValue>
Type Parameters
TKeySourceThe value type of source partition Map<K, V> in
sourcePartitionTOffsetThe value type of source offset Map<K, V> in
sourceOffsetTKeyTValue
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
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<TKey, TValue>
Type Parameters
TKeySourceThe value type of source partition Map<K, V> in
sourcePartitionTOffsetThe value type of source offset Map<K, V> in
sourceOffsetTKeyTValue
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
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<TKey, TValue>
Type Parameters
TKeySourceThe value type of source partition Map<K, V> in
sourcePartitionTOffsetThe value type of source offset Map<K, V> in
sourceOffsetTKeyTValue
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()