Package org.radarbase.schema
Class SchemaCatalogue
- java.lang.Object
-
- org.radarbase.schema.SchemaCatalogue
-
public class SchemaCatalogue extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SchemaCatalogue(java.nio.file.Path root)SchemaCatalogue(java.nio.file.Path root, org.radarbase.schema.Scope scope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.radarbase.topic.AvroTopic<org.apache.avro.generic.GenericRecord,org.apache.avro.generic.GenericRecord>getGenericAvroTopic(org.radarbase.config.AvroTopicConfig config)Returns an avro topic with the schemas from this catalogue.kotlin.Pair<SchemaMetadata,SchemaMetadata>getSchemaMetadata(org.radarbase.config.AvroTopicConfig config)Returns an avro topic with the schemas from this catalogue.java.util.Map<java.lang.String,SchemaMetadata>getSchemas()java.util.List<SchemaMetadata>getUnmappedAvroFiles()
-
-
-
Method Detail
-
getGenericAvroTopic
public org.radarbase.topic.AvroTopic<org.apache.avro.generic.GenericRecord,org.apache.avro.generic.GenericRecord> getGenericAvroTopic(org.radarbase.config.AvroTopicConfig config)
Returns an avro topic with the schemas from this catalogue.- Parameters:
config- avro topic configuration- Returns:
- AvroTopic with
- Throws:
java.util.NoSuchElementException- if the key or value schema do not exist in this catalogue.java.lang.NullPointerException- if the key or value schema configurations are nulljava.lang.IllegalArgumentException- if the topic configuration is null
-
getSchemas
public java.util.Map<java.lang.String,SchemaMetadata> getSchemas()
-
getUnmappedAvroFiles
public java.util.List<SchemaMetadata> getUnmappedAvroFiles()
-
getSchemaMetadata
public kotlin.Pair<SchemaMetadata,SchemaMetadata> getSchemaMetadata(org.radarbase.config.AvroTopicConfig config)
Returns an avro topic with the schemas from this catalogue.- Parameters:
config- avro topic configuration- Returns:
- AvroTopic with
- Throws:
java.util.NoSuchElementException- if the key or value schema do not exist in this catalogue.java.lang.NullPointerException- if the key or value schema configurations are nulljava.lang.IllegalArgumentException- if the topic configuration is null
-
-