class AvroToJsonFormatter[K, V] extends AbstractSchemaBasedRecordFormatter[K, V]
Formatter uses writer schema ids to assure test data represent raw events data, without schema evolution (which adjusts data to reader schema). Test data record contains data of ConsumerRecord and contains key and value schema ids (see [SchemaBasedSerializableConsumerRecord]).
- Alphabetic
- By Inheritance
- AvroToJsonFormatter
- AbstractSchemaBasedRecordFormatter
- RecordFormatter
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new AvroToJsonFormatter(kafkaConfig: KafkaConfig, schemaRegistryClient: SchemaRegistryClient, keyMessageReader: AvroMessageReader, valueMessageReader: AvroMessageReader, deserializationSchema: KafkaDeserializationSchema[ConsumerRecord[K, V]], schemaIdFromMessageExtractor: SchemaIdFromMessageExtractor)(implicit arg0: ClassTag[K], arg1: ClassTag[V])
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()
-
val
deserializationSchema: KafkaDeserializationSchema[ConsumerRecord[K, V]]
- Attributes
- protected
- Definition Classes
- AvroToJsonFormatter → AbstractSchemaBasedRecordFormatter
-
def
deserialize(record: ConsumerRecord[Array[Byte], Array[Byte]], valueSchemaIdOpt: Option[SchemaId]): ConsumerRecord[K, V]
- Attributes
- protected
- Definition Classes
- AbstractSchemaBasedRecordFormatter
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
formatMessage(schemaIdOpt: Option[SchemaId], data: Any): Json
- Attributes
- protected
- Definition Classes
- AvroToJsonFormatter → AbstractSchemaBasedRecordFormatter
-
def
formatRecord(record: ConsumerRecord[Array[Byte], Array[Byte]]): TestRecord
Step 1: Deserialize raw kafka event to record domain (e.g.
Step 1: Deserialize raw kafka event to record domain (e.g. GenericRecord). Step 2: Create Encoders that convert record to json Step 3: Encode event's data with schema id's with derived encoder.
- Attributes
- protected
- Definition Classes
- AbstractSchemaBasedRecordFormatter → RecordFormatter
-
def
generateTestData(topics: NonEmptyList[ForSource], size: Int, kafkaConfig: KafkaConfig): TestData
- Definition Classes
- RecordFormatter
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
kafkaConfig: KafkaConfig
- Attributes
- protected
- Definition Classes
- AvroToJsonFormatter → AbstractSchemaBasedRecordFormatter
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
parseRecord(topic: ForSource, testRecord: TestRecord): ConsumerRecord[Array[Byte], Array[Byte]]
Step 1: Deserialize raw json bytes to SchemaBasedSerializableConsumerRecord[Json, Json] domain without interpreting key and value content.
Step 1: Deserialize raw json bytes to SchemaBasedSerializableConsumerRecord[Json, Json] domain without interpreting key and value content. Step 2: Create key and value json-to-record interpreter based on schema id's provided in json. Step 3: Use interpreter to create raw kafka ConsumerRecord
- Definition Classes
- AbstractSchemaBasedRecordFormatter → RecordFormatter
-
def
prepareGeneratedTestData(records: List[ConsumerRecord[Array[Byte], Array[Byte]]]): TestData
- Definition Classes
- RecordFormatter
-
def
readRecordKeyMessage(schemaOpt: Option[ParsedSchema], topic: ForSource, jsonObj: Json): Array[Byte]
- Attributes
- protected
- Definition Classes
- AvroToJsonFormatter → AbstractSchemaBasedRecordFormatter
-
def
readValueMessage(schemaOpt: Option[ParsedSchema], topic: ForSource, jsonObj: Json): Array[Byte]
- Attributes
- protected
- Definition Classes
- AvroToJsonFormatter → AbstractSchemaBasedRecordFormatter
-
val
schemaIdFromMessageExtractor: SchemaIdFromMessageExtractor
- Attributes
- protected
- Definition Classes
- AvroToJsonFormatter → AbstractSchemaBasedRecordFormatter
-
val
schemaRegistryClient: SchemaRegistryClient
- Attributes
- protected
- Definition Classes
- AvroToJsonFormatter → AbstractSchemaBasedRecordFormatter
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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( ... )
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.