Skip to content

Commit

Permalink
deprecated old avro code
Browse files Browse the repository at this point in the history
  • Loading branch information
nextdude committed Dec 2, 2021
1 parent 4890d74 commit 3ffd924
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/scala/io/epiphanous/flinkrunner/avro/AvroCoder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ import scala.util.Try
* @tparam Context
* the schema registry context type
*/
@deprecated(
"Use the ConfluentAvroRegistryKafkaRecordSerialization and Deserialization classes instead",
"4.0.0"
)
class AvroCoder[Context](registry: AvroSchemaRegistryClient[Context])
extends LazyLogging {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package io.epiphanous.flinkrunner.avro

@deprecated(
"Use the ConfluentAvroRegistryKafkaRecordSerialization and Deserialization classes instead",
"4.0.0"
)
class AvroCodingException(
message: String = "Failure during Avro coding",
cause: Throwable = None.orNull)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import scala.util.Try
/**
* A trait for an avro schema registry
*/
@deprecated(
"Use the ConfluentAvroRegistryKafkaRecordSerialization and Deserialization classes instead",
"4.0.0"
)
trait AvroSchemaRegistryClient[Context] {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ import java.util.concurrent.TimeUnit
import scala.concurrent.{ExecutionContext, ExecutionContextExecutor}
import scala.util.{Failure, Success, Try}

@deprecated(
"Use the ConfluentAvroRegistryKafkaRecordSerialization and Deserialization classes instead",
"4.0.0"
)
class ConfluentSchemaRegistryClient[ADT <: FlinkEvent: TypeInformation](
config: FlinkConfig[ADT])(implicit
decoder: Decoder[ConfluentSchemaRegistryResponse])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package io.epiphanous.flinkrunner.avro

@deprecated(
"Use the ConfluentAvroRegistryKafkaRecordSerialization and Deserialization classes instead",
"4.0.0"
)
case class ConfluentSchemaRegistryContext(
isKey: Boolean = false,
version: String = "latest")
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,34 @@ import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder}
import io.circe.syntax._
import io.circe.{Decoder, Encoder}

@deprecated(
"Use the ConfluentAvroRegistryKafkaRecordSerialization and Deserialization classes instead",
"4.0.0"
)
sealed trait ConfluentSchemaRegistryResponse {
def schema: String
}

@deprecated(
"Use the ConfluentAvroRegistryKafkaRecordSerialization and Deserialization classes instead",
"4.0.0"
)
case class ConfluentSchemaRegistryResponseById(schema: String)
extends ConfluentSchemaRegistryResponse

@deprecated(
"Use the ConfluentAvroRegistryKafkaRecordSerialization and Deserialization classes instead",
"4.0.0"
)
object ConfluentSchemaRegistryResponseById {
implicit val encoder = deriveEncoder[ConfluentSchemaRegistryResponseById]
implicit val decoder = deriveDecoder[ConfluentSchemaRegistryResponseById]
}

@deprecated(
"Use the ConfluentAvroRegistryKafkaRecordSerialization and Deserialization classes instead",
"4.0.0"
)
case class ConfluentSchemaRegistryResponseBySubjectVersion(
subject: String,
id: Int,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import java.time.Instant
import java.time.temporal.ChronoUnit
import scala.util.Try

@deprecated(
"Use the ConfluentAvroRegistryKafkaRecordSerialization and Deserialization classes instead",
"4.0.0"
)
case class RegisteredAvroSchema(
schema: Schema,
id: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import java.nio.ByteBuffer
import scala.collection.mutable
import scala.util.{Failure, Success, Try}

@deprecated(
"Use the ConfluentAvroRegistryKafkaRecordSerialization and Deserialization classes instead",
"4.0.0"
)
class TestSchemaRegistryClient
extends AvroSchemaRegistryClient[ConfluentSchemaRegistryContext] {
val schemas =
Expand Down

0 comments on commit 3ffd924

Please sign in to comment.