package scavro
- Alphabetic
- Public
- All
Type Members
-
trait
AvroMetadata[S, J] extends AnyRef
Provides a mapping between the Scala wrapper class
S, which should extend AvroSerializeable, and the corresponding Java classJ, which should extendorg.apache.avro.specific.SpecificRecordBase.Provides a mapping between the Scala wrapper class
S, which should extend AvroSerializeable, and the corresponding Java classJ, which should extendorg.apache.avro.specific.SpecificRecordBase. Typically an an implicit instance of this trait would be defined on the companion object of a class extending AvroSerializeable, andJwould be a Java class produced by Avro code generation.An implicit instance with this trait will provide to Avro values that would in a Java application be provided by static members of the
SpecificRecordBase.- S
Scala class
- J
Java class from Avro code generation
-
abstract
class
AvroReader[S <: AvroSerializeable] extends AnyRef
Reads a serialized Avro file into the provided class.
Reads a serialized Avro file into the provided class.
val reader: AvroReader[MyAvroClass] = AvroReader[MyAvroClass] val dataRead: Seq[MyAvroClass] = reader.read("MyDataFile.avro")
- S
Class to be deserialized
-
trait
AvroSerializeable extends AnyRef
AvroSerializeable is the base trait of scala classes to be serialized or deserialized through the AvroReader and AvroWriter classes.
-
class
AvroWriter[S <: AvroSerializeable] extends AnyRef
AvroWriter serializes a class that implements the AvroSerializeable trait and writes to the supplied
OutputStream.AvroWriter serializes a class that implements the AvroSerializeable trait and writes to the supplied
OutputStream.dataToWrite: Seq[MyOutputClass] = ... val writer = AvroWriter[MyOutputClass]("MyOutputFile.avro") writer.write(dataToWrite)
- S
Type to be serialized
Value Members
- object AvroReader
-
object
AvroWriter
Factory for AvroWriter instances.