-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add kafka info headers to deserialized avro messages
- Loading branch information
Showing
2 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/main/scala/io/epiphanous/flinkrunner/model/KafkaInfoHeader.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package io.epiphanous.flinkrunner.model | ||
|
||
import enumeratum._ | ||
|
||
import scala.collection.immutable | ||
|
||
sealed trait KafkaInfoHeader extends EnumEntry | ||
|
||
object KafkaInfoHeader extends Enum[KafkaInfoHeader] { | ||
|
||
case object SerializedValueSize extends KafkaInfoHeader | ||
case object SerializedKeySize extends KafkaInfoHeader | ||
case object Offset extends KafkaInfoHeader | ||
case object Partition extends KafkaInfoHeader | ||
case object Timestamp extends KafkaInfoHeader | ||
case object TimestampType extends KafkaInfoHeader | ||
case object Topic extends KafkaInfoHeader | ||
|
||
def headerName(h: KafkaInfoHeader) = s"Kafka.${h.entryName}" | ||
|
||
override def values: immutable.IndexedSeq[KafkaInfoHeader] = findValues | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters