Class/Object

pl.touk.nussknacker.engine.avro.source

KafkaAvroSourceFactory

Related Docs: object KafkaAvroSourceFactory | package source

Permalink

class KafkaAvroSourceFactory[K, V] extends FlinkSourceFactory[ConsumerRecord[K, V]] with KafkaAvroBaseTransformer[FlinkSource[ConsumerRecord[K, V]]] with Serializable

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)

Linear Supertypes
KafkaAvroBaseTransformer[FlinkSource[ConsumerRecord[K, V]]], WithCachedTopicsExistenceValidator, TopicsExistenceValidator, SingleInputGenericNodeTransformation[FlinkSource[ConsumerRecord[K, V]]], GenericNodeTransformation[FlinkSource[ConsumerRecord[K, V]]], FlinkSourceFactory[ConsumerRecord[K, V]], SourceFactory[ConsumerRecord[K, V]], Component, Serializable, Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KafkaAvroSourceFactory
  2. KafkaAvroBaseTransformer
  3. WithCachedTopicsExistenceValidator
  4. TopicsExistenceValidator
  5. SingleInputGenericNodeTransformation
  6. GenericNodeTransformation
  7. FlinkSourceFactory
  8. SourceFactory
  9. Component
  10. Serializable
  11. Serializable
  12. AnyRef
  13. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new KafkaAvroSourceFactory(schemaRegistryProvider: SchemaRegistryProvider, processObjectDependencies: ProcessObjectDependencies, timestampAssigner: Option[TimestampWatermarkHandler[ConsumerRecord[K, V]]])(implicit arg0: ClassTag[K], arg1: ClassTag[V])

    Permalink

    schemaRegistryProvider

    - provides a set of strategies for serialization and deserialization while event processing and/or testing.

Type Members

  1. type DefinedParameter = DefinedSingleParameter

    Permalink
    Definition Classes
    SingleInputGenericNodeTransformation → GenericNodeTransformation
  2. case class FinalResults extends TransformationStepResult with Product with Serializable

    Permalink
    Definition Classes
    GenericNodeTransformation
  3. type InputContext = ValidationContext

    Permalink
    Definition Classes
    SingleInputGenericNodeTransformation → GenericNodeTransformation
  4. case class NextParameters extends TransformationStepResult with Product with Serializable

    Permalink
    Definition Classes
    GenericNodeTransformation
  5. type NodeTransformationDefinition = PartialFunction[TransformationStep, TransformationStepResult]

    Permalink
    Definition Classes
    GenericNodeTransformation
  6. type State = KafkaAvroSourceFactoryState[K, V, DefinedParameter]

    Permalink
    Definition Classes
    KafkaAvroSourceFactory → GenericNodeTransformation
  7. case class TransformationStep extends Product with Serializable

    Permalink
    Definition Classes
    GenericNodeTransformation
  8. sealed trait TransformationStepResult extends AnyRef

    Permalink
    Definition Classes
    GenericNodeTransformation
  9. type WithError[V] = WriterT[Id, List[ProcessCompilationError], V]

    Permalink
    Definition Classes
    KafkaAvroBaseTransformer

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clazz: Class[ConsumerRecord[K, V]]

    Permalink
    Definition Classes
    FlinkSourceFactory → SourceFactory
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  7. def contextTransformation(context: ValidationContext, dependencies: List[NodeDependencyValue])(implicit nodeId: NodeId): NodeTransformationDefinition

    Permalink
    Definition Classes
    KafkaAvroSourceFactory → GenericNodeTransformation
  8. def createSource(params: Map[String, Any], dependencies: List[NodeDependencyValue], finalState: Option[State], preparedTopics: List[PreparedKafkaTopic], kafkaConfig: KafkaConfig, deserializationSchema: KafkaDeserializationSchema[ConsumerRecord[K, V]], timestampAssigner: Option[TimestampWatermarkHandler[ConsumerRecord[K, V]]], formatter: RecordFormatter, flinkContextInitializer: FlinkContextInitializer[ConsumerRecord[K, V]]): KafkaSource[ConsumerRecord[K, V]]

    Permalink

    Basic implementation of new source creation.

    Basic implementation of new source creation. Override this method to create custom KafkaSource.

    Attributes
    protected
  9. def determineSchemaAndType(schemaDeterminer: AvroSchemaDeterminer, paramName: Option[String])(implicit nodeId: NodeId): Validated[ProcessCompilationError, (Option[RuntimeSchemaData], TypingResult)]

    Permalink
    Attributes
    protected
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def extractPreparedTopic(params: Map[String, Any]): PreparedKafkaTopic

    Permalink
    Attributes
    protected
    Definition Classes
    KafkaAvroBaseTransformer
  13. def extractVersionOption(params: Map[String, Any]): SchemaVersionOption

    Permalink
    Attributes
    protected
    Definition Classes
    KafkaAvroBaseTransformer
  14. val fallbackVersionOptionParam: Parameter

    Permalink
    Attributes
    protected
    Definition Classes
    KafkaAvroBaseTransformer
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  16. def getTopicParam(implicit nodeId: NodeId): WithError[Parameter]

    Permalink
    Attributes
    protected
    Definition Classes
    KafkaAvroBaseTransformer
  17. def getVersionParam(versions: List[Integer]): Parameter

    Permalink
    Attributes
    protected
    Definition Classes
    KafkaAvroBaseTransformer
  18. def getVersionParam(preparedTopic: PreparedKafkaTopic)(implicit nodeId: NodeId): WithError[Parameter]

    Permalink
    Attributes
    protected
    Definition Classes
    KafkaAvroBaseTransformer
  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  20. def implementation(params: Map[String, Any], dependencies: List[NodeDependencyValue], finalState: Option[State]): FlinkSource[ConsumerRecord[K, V]]

    Permalink
    Definition Classes
    KafkaAvroSourceFactory → GenericNodeTransformation
  21. def initialParameters: List[Parameter]

    Permalink
    Definition Classes
    KafkaAvroBaseTransformer → GenericNodeTransformation
  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. val kafkaConfig: KafkaConfig

    Permalink
    Attributes
    protected
    Definition Classes
    KafkaAvroBaseTransformer → WithCachedTopicsExistenceValidator
  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. def nextSteps(context: ValidationContext, dependencies: List[NodeDependencyValue])(implicit nodeId: NodeId): NodeTransformationDefinition

    Permalink
    Attributes
    protected
  26. def nodeDependencies: List[NodeDependency]

    Permalink
    Definition Classes
    KafkaAvroSourceFactory → GenericNodeTransformation
  27. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  28. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  29. val nullTopicOption: FixedExpressionValue

    Permalink
    Definition Classes
    KafkaAvroBaseTransformer
  30. def paramsDeterminedAfterSchema: List[Parameter]

    Permalink
  31. def parseVersionOption(versionOptionName: String): SchemaVersionOption

    Permalink
    Attributes
    protected
    Definition Classes
    KafkaAvroBaseTransformer
  32. def prepareKafkaConfig: KafkaConfig

    Permalink
    Attributes
    protected
    Definition Classes
    KafkaAvroBaseTransformer
  33. def prepareKeySchemaDeterminer(preparedTopic: PreparedKafkaTopic): AvroSchemaDeterminer

    Permalink
    Attributes
    protected
    Definition Classes
    KafkaAvroBaseTransformer
  34. def prepareSourceFinalErrors(context: ValidationContext, dependencies: List[NodeDependencyValue], parameters: List[(String, DefinedParameter)], errors: List[ProcessCompilationError])(implicit nodeId: NodeId): FinalResults

    Permalink
    Attributes
    protected
  35. def prepareSourceFinalResults(preparedTopic: PreparedKafkaTopic, valueValidationResult: Validated[ProcessCompilationError, (Option[RuntimeSchemaData], TypingResult)], context: ValidationContext, dependencies: List[NodeDependencyValue], parameters: List[(String, DefinedParameter)], errors: List[ProcessCompilationError])(implicit nodeId: NodeId): FinalResults

    Permalink
    Attributes
    protected
  36. def prepareTopic(topic: String): PreparedKafkaTopic

    Permalink
    Attributes
    protected
    Definition Classes
    KafkaAvroBaseTransformer
  37. def prepareValueSchemaDeterminer(preparedTopic: PreparedKafkaTopic, version: SchemaVersionOption): AvroSchemaDeterminer

    Permalink
    Attributes
    protected
    Definition Classes
    KafkaAvroBaseTransformer
  38. val processObjectDependencies: ProcessObjectDependencies

    Permalink
  39. def schemaParamStep(implicit nodeId: NodeId): NodeTransformationDefinition

    Permalink
    Attributes
    protected
    Definition Classes
    KafkaAvroBaseTransformer
  40. lazy val schemaRegistryClient: SchemaRegistryClient

    Permalink
    Attributes
    protected
    Definition Classes
    KafkaAvroBaseTransformer
  41. val schemaRegistryProvider: SchemaRegistryProvider

    Permalink

    - provides a set of strategies for serialization and deserialization while event processing and/or testing.

    - provides a set of strategies for serialization and deserialization while event processing and/or testing.

    Definition Classes
    KafkaAvroSourceFactoryKafkaAvroBaseTransformer
  42. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  43. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  44. val topicParamName: String

    Permalink
    Attributes
    protected
    Definition Classes
    KafkaAvroBaseTransformer
  45. def topicParamStep(implicit nodeId: NodeId): NodeTransformationDefinition

    Permalink
    Attributes
    protected
    Definition Classes
    KafkaAvroBaseTransformer
  46. def topicSelectionStrategy: TopicSelectionStrategy

    Permalink
    Attributes
    protected
    Definition Classes
    KafkaAvroBaseTransformer
  47. def typedDependency[C](list: List[NodeDependencyValue])(implicit arg0: ClassTag[C]): C

    Permalink
    Attributes
    protected
    Definition Classes
    KafkaAvroBaseTransformer
  48. final def validateTopic(topic: String): Validated[TopicExistenceValidationException, String]

    Permalink
    Definition Classes
    TopicsExistenceValidator
  49. final def validateTopics(topics: List[String]): Validated[TopicExistenceValidationException, List[String]]

    Permalink
    Definition Classes
    WithCachedTopicsExistenceValidator → TopicsExistenceValidator
  50. lazy val validator: CachedTopicsExistenceValidator

    Permalink
    Attributes
    protected
    Definition Classes
    WithCachedTopicsExistenceValidator
  51. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from KafkaAvroBaseTransformer[FlinkSource[ConsumerRecord[K, V]]]

Inherited from WithCachedTopicsExistenceValidator

Inherited from TopicsExistenceValidator

Inherited from SingleInputGenericNodeTransformation[FlinkSource[ConsumerRecord[K, V]]]

Inherited from GenericNodeTransformation[FlinkSource[ConsumerRecord[K, V]]]

Inherited from FlinkSourceFactory[ConsumerRecord[K, V]]

Inherited from SourceFactory[ConsumerRecord[K, V]]

Inherited from Component

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped