Class

org.apache.spark.sql.avro.confluent

ConfluentClient

Related Doc: package confluent

Permalink

class ConfluentClient extends Logging with Serializable

Wrapper for schema registry client. It supports advanced logic for schema compatibility check and update. It provides Spark SQL functions from/to_confluent_avro for decoding/encoding confluent avro messages.

Linear Supertypes
Serializable, Serializable, Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ConfluentClient
  2. Serializable
  3. Serializable
  4. Logging
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ConfluentClient(schemaRegistryUrl: String)

    Permalink

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. val CONFLUENT_MAGIC_BYTE: Int

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def from_confluent_avro(data: Column, topic: String, subjectType: SubjectType): Column

    Permalink

    Converts a binary column of confluent avro format into its corresponding catalyst value according to the latest schema stored in schema registry.

    Converts a binary column of confluent avro format into its corresponding catalyst value according to the latest schema stored in schema registry. Note: copied from org.apache.spark.sql.avro.*

    data

    the binary column.

    topic

    the topic name.

    subjectType

    the subject type (key or value).

  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def getLatestSchemaFromConfluent(subject: String): (Int, Schema)

    Permalink
  13. def getSchemaFromConfluent(id: Int): (Int, Schema)

    Permalink
  14. def getSubject(topic: String, subjectType: SubjectType): String

    Permalink

    get the subject name for a topic (confluent standard is postfixing '-key' or '-value')

  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  17. def initializeLogIfNecessary(isInterpreter: Boolean): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def isTraceEnabled(): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  20. def log: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  21. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  22. def logDebug(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  23. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  24. def logError(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  25. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  26. def logInfo(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  27. def logName: String

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  28. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  29. def logTrace(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  30. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  31. def logWarning(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  32. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  33. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  34. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  35. def setOrGetSchema(subject: String, newSchema: Schema): (Int, Schema)

    Permalink

    Get existing schema, otherwise create schema

    Get existing schema, otherwise create schema

    returns

    confluent schemaId and registered schema

  36. def setOrUpdateSchema(subject: String, newSchema: Schema, mutualReadCheck: Boolean = false): (Int, Schema)

    Permalink

    If schema already exists, update if compatible, otherwise create schema Throws exception if new schema is not compatible.

    If schema already exists, update if compatible, otherwise create schema Throws exception if new schema is not compatible.

    returns

    confluent schemaId and registered schema

  37. lazy val sr: SchemaRegistryClient

    Permalink
  38. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  39. def test(): Unit

    Permalink

    test connection by calling a simple function

  40. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  41. def to_confluent_avro(data: Column, topic: String, subjectType: SubjectType, updateAllowed: Boolean = false, mutualReadCheck: Boolean = false, eagerCheck: Boolean = false): Column

    Permalink

    Converts a column into binary of confluent avro format according to the latest schema stored in schema registry.

    Converts a column into binary of confluent avro format according to the latest schema stored in schema registry. Note: copied from org.apache.spark.sql.avro.*

    data

    the data column.

    topic

    the topic name.

    subjectType

    the subject type (key or value).

    updateAllowed

    if subject schema should be updated if compatible

    eagerCheck

    if true tiggers instantiation of converter object instances

  42. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit

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

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

Inherited from Serializable

Inherited from Serializable

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped