Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

package za.co.absa.abris.avro.registry
import io.confluent.kafka.schemaregistry.client.rest.RestService
import io.confluent.kafka.schemaregistry.client.{CachedSchemaRegistryClient, SchemaRegistryClient}
import io.confluent.kafka.serializers.KafkaAvroDeserializerConfig

Expand All @@ -23,6 +24,10 @@ import scala.collection.JavaConverters._
class ConfluentRegistryClient(client: SchemaRegistryClient) extends AbstractConfluentRegistryClient(client) {

def this(configs: Map[String,String]) = this(ConfluentRegistryClient.createClient(configs))

def this(restService: RestService, maxSchemaObject: Int) = {
this(ConfluentRegistryClient.createClient(restService, maxSchemaObject))
}
}
Comment on lines +27 to 31

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Lets update the files where this class is being used.
  2. Add Test cases
  3. Add scaladoc for this in terms of how to use this constructor


object ConfluentRegistryClient {
Expand All @@ -35,4 +40,8 @@ object ConfluentRegistryClient {
new CachedSchemaRegistryClient(urls, maxSchemaObject, configs.asJava)
}

private def createClient(restService: RestService, maxSchemaObject: Int) = {
new CachedSchemaRegistryClient(restService, maxSchemaObject)
}

}