pl.touk.nussknacker.engine.schemedkafka.source
KafkaAvroSourceFactory
Companion object KafkaAvroSourceFactory
class KafkaAvroSourceFactory[K, V] extends SourceFactory with KafkaUniversalComponentTransformer[Source]
Base implementation of KafkaSource factory with Avro schema support. It is based on GenericNodeTransformation to - allow key and value type identification based on Schema Registry and - allow Context initialization with event's value, key and metadata You can provide schemas for both key and value. When useStringForKey = true (see KafkaConfig) the contents of event's key are treated as String (this is default scenario). Reader schema used in runtime is determined by topic and version. Reader schema can be different than schema used by writer (e.g. when writer produces event with new schema), in that case "schema evolution" may be required. For SpecificRecord use SpecificRecordKafkaAvroSourceFactory. Assumptions: 1. Every event that comes in has its key and value schemas registered in Schema Registry. 2. Avro payload must include schema id for both Generic and Specific records (to provide "schema evolution" we need to know the exact writers schema).
- K
- type of event's key, used to determine if key object is Specific or Generic (for GenericRecords use Any)
- V
- type of event's value, used to determine if value object is Specific or Generic (for GenericRecords use Any)
- Alphabetic
- By Inheritance
- KafkaAvroSourceFactory
- KafkaUniversalComponentTransformer
- WithCachedTopicsExistenceValidator
- TopicsExistenceValidator
- SingleInputGenericNodeTransformation
- GenericNodeTransformation
- SourceFactory
- Component
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new KafkaAvroSourceFactory(schemaRegistryClientFactory: SchemaRegistryClientFactory, schemaBasedMessagesSerdeProvider: SchemaBasedSerdeProvider, processObjectDependencies: ProcessObjectDependencies, implProvider: KafkaSourceImplFactory[K, V])(implicit arg0: ClassTag[K], arg1: ClassTag[V])
Type Members
-
type
DefinedParameter = DefinedSingleParameter
- Definition Classes
- SingleInputGenericNodeTransformation → GenericNodeTransformation
-
case class
FinalResults extends TransformationStepResult with Product with Serializable
- Definition Classes
- GenericNodeTransformation
-
type
InputContext = ValidationContext
- Definition Classes
- SingleInputGenericNodeTransformation → GenericNodeTransformation
-
case class
NextParameters extends TransformationStepResult with Product with Serializable
- Definition Classes
- GenericNodeTransformation
-
type
NodeTransformationDefinition = PartialFunction[TransformationStep, TransformationStepResult]
- Definition Classes
- GenericNodeTransformation
-
type
State = KafkaAvroSourceFactoryState[K, V]
- Definition Classes
- KafkaAvroSourceFactory → GenericNodeTransformation
-
case class
TransformationStep extends Product with Serializable
- Definition Classes
- GenericNodeTransformation
-
sealed
trait
TransformationStepResult extends AnyRef
- Definition Classes
- GenericNodeTransformation
-
type
WithError[V] = WriterT[Id, List[ProcessCompilationError], V]
- Definition Classes
- KafkaUniversalComponentTransformer
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
contextTransformation(context: ValidationContext, dependencies: List[NodeDependencyValue])(implicit nodeId: NodeId): NodeTransformationDefinition
- Definition Classes
- KafkaAvroSourceFactory → GenericNodeTransformation
-
def
determineSchemaAndType(schemaDeterminer: AvroSchemaDeterminer, paramName: Option[String])(implicit nodeId: NodeId): Validated[ProcessCompilationError, (Option[RuntimeSchemaData[AvroSchema]], TypingResult)]
- Attributes
- protected
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
extractPreparedTopic(params: Map[String, Any]): PreparedKafkaTopic
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer
-
def
extractVersionOption(params: Map[String, Any]): SchemaVersionOption
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer
-
def
fallbackFinalResult(step: TransformationStep, inputContext: InputContext, outputVariable: Option[String])(implicit nodeId: NodeId): FinalResults
- Attributes
- protected
- Definition Classes
- GenericNodeTransformation
-
val
fallbackVersionOptionParam: Parameter
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
getTopicParam(implicit nodeId: NodeId): WithError[Parameter]
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer
-
def
getVersionParam(versions: List[Integer]): Parameter
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer
-
def
getVersionParam(preparedTopic: PreparedKafkaTopic)(implicit nodeId: NodeId): WithError[Parameter]
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer
-
def
handleExceptionDuringTransformation(step: TransformationStep, inputContext: InputContext, outputVariable: Option[String], ex: Throwable)(implicit nodeId: NodeId): FinalResults
- Definition Classes
- GenericNodeTransformation
-
def
handleUnmatchedTransformationStep(step: TransformationStep, inputContext: InputContext, outputVariable: Option[String])(implicit nodeId: NodeId): FinalResults
- Definition Classes
- GenericNodeTransformation
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
val
implProvider: KafkaSourceImplFactory[K, V]
- Attributes
- protected
-
def
implementation(params: Map[String, Any], dependencies: List[NodeDependencyValue], finalState: Option[State]): Source
- Definition Classes
- KafkaAvroSourceFactory → GenericNodeTransformation
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
kafkaConfig: KafkaConfig
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer → WithCachedTopicsExistenceValidator
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nextSteps(context: ValidationContext, dependencies: List[NodeDependencyValue])(implicit nodeId: NodeId): NodeTransformationDefinition
- Attributes
- protected
-
def
nodeDependencies: List[NodeDependency]
- Definition Classes
- KafkaAvroSourceFactory → GenericNodeTransformation
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
val
nullTopicOption: FixedExpressionValue
- Definition Classes
- KafkaUniversalComponentTransformer
-
def
paramsDeterminedAfterSchema: List[Parameter]
- Definition Classes
- KafkaAvroSourceFactory → KafkaUniversalComponentTransformer
-
def
parseVersionOption(versionOptionName: String): SchemaVersionOption
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer
-
def
prepareContextInitializer(dependencies: List[NodeDependencyValue], parameters: List[(String, DefinedParameter)], keyTypingResult: TypingResult, valueTypingResult: TypingResult): ContextInitializer[ConsumerRecord[K, V]]
- Attributes
- protected
-
final
def
prepareFinalResultWithOptionalVariable(inputContext: InputContext, outputVariable: Option[(String, TypingResult)], state: Option[State])(implicit nodeId: NodeId): FinalResults
- Attributes
- protected
- Definition Classes
- GenericNodeTransformation
-
def
prepareKafkaConfig: KafkaConfig
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer
-
def
prepareKeySchemaDeterminer(preparedTopic: PreparedKafkaTopic): AvroSchemaDeterminer
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer
-
def
prepareSourceFinalErrors(context: ValidationContext, dependencies: List[NodeDependencyValue], parameters: List[(String, DefinedParameter)], errors: List[ProcessCompilationError])(implicit nodeId: NodeId): FinalResults
- Attributes
- protected
-
def
prepareSourceFinalResults(preparedTopic: PreparedKafkaTopic, valueValidationResult: Validated[ProcessCompilationError, (Option[RuntimeSchemaData[AvroSchema]], TypingResult)], context: ValidationContext, dependencies: List[NodeDependencyValue], parameters: List[(String, DefinedParameter)], errors: List[ProcessCompilationError])(implicit nodeId: NodeId): FinalResults
- Attributes
- protected
-
def
prepareTopic(topic: String): PreparedKafkaTopic
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer
-
def
prepareUniversalKeySchemaDeterminer(preparedTopic: PreparedKafkaTopic): ParsedSchemaDeterminer
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer
-
def
prepareUniversalValueSchemaDeterminer(preparedTopic: PreparedKafkaTopic, version: SchemaVersionOption): ParsedSchemaDeterminer
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer
-
def
prepareValueSchemaDeterminer(preparedTopic: PreparedKafkaTopic, version: SchemaVersionOption): AvroSchemaDeterminer
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer
-
val
processObjectDependencies: ProcessObjectDependencies
- Definition Classes
- KafkaAvroSourceFactory → KafkaUniversalComponentTransformer
- val schemaBasedMessagesSerdeProvider: SchemaBasedSerdeProvider
-
def
schemaParamStep(implicit nodeId: NodeId): NodeTransformationDefinition
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer
-
lazy val
schemaRegistryClient: SchemaRegistryClient
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer
- Annotations
- @transient()
-
val
schemaRegistryClientFactory: SchemaRegistryClientFactory
- Definition Classes
- KafkaAvroSourceFactory → KafkaUniversalComponentTransformer
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
val
topicParamName: String
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer
-
def
topicParamStep(implicit nodeId: NodeId): NodeTransformationDefinition
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer
-
def
topicSelectionStrategy: TopicSelectionStrategy
- Attributes
- protected
- Definition Classes
- KafkaUniversalComponentTransformer
-
final
def
validateTopic(topic: String): Validated[TopicExistenceValidationException, String]
- Definition Classes
- TopicsExistenceValidator
-
final
def
validateTopics(topics: List[String]): Validated[TopicExistenceValidationException, List[String]]
- Definition Classes
- WithCachedTopicsExistenceValidator → TopicsExistenceValidator
-
lazy val
validator: CachedTopicsExistenceValidator
- Attributes
- protected
- Definition Classes
- WithCachedTopicsExistenceValidator
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
object
FinalResults extends Serializable
- Definition Classes
- GenericNodeTransformation
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.