Class AvroSchemaIOProvider

  • All Implemented Interfaces:
    org.apache.beam.sdk.schemas.io.SchemaIOProvider

    @Internal
    @AutoService(org.apache.beam.sdk.schemas.io.SchemaIOProvider.class)
    public class AvroSchemaIOProvider
    extends java.lang.Object
    implements org.apache.beam.sdk.schemas.io.SchemaIOProvider
    An implementation of SchemaIOProvider for reading and writing Avro files with AvroIO.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.beam.sdk.schemas.Schema configurationSchema()
      Returns the expected schema of the configuration object.
      org.apache.beam.sdk.extensions.avro.io.AvroSchemaIOProvider.AvroSchemaIO from​(java.lang.String location, org.apache.beam.sdk.values.Row configuration, org.apache.beam.sdk.schemas.Schema dataSchema)
      Produce a SchemaIO given a String representing the data's location, the schema of the data that resides there, and some IO-specific configuration object.
      java.lang.String identifier()
      Returns an id that uniquely represents this IO.
      org.apache.beam.sdk.values.PCollection.IsBounded isBounded()  
      boolean requiresDataSchema()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AvroSchemaIOProvider

        public AvroSchemaIOProvider()
    • Method Detail

      • identifier

        public java.lang.String identifier()
        Returns an id that uniquely represents this IO.
        Specified by:
        identifier in interface org.apache.beam.sdk.schemas.io.SchemaIOProvider
      • configurationSchema

        public org.apache.beam.sdk.schemas.Schema configurationSchema()
        Returns the expected schema of the configuration object. Note this is distinct from the schema of the data source itself. No configuration expected for Avro.
        Specified by:
        configurationSchema in interface org.apache.beam.sdk.schemas.io.SchemaIOProvider
      • from

        public org.apache.beam.sdk.extensions.avro.io.AvroSchemaIOProvider.AvroSchemaIO from​(java.lang.String location,
                                                                                             org.apache.beam.sdk.values.Row configuration,
                                                                                             org.apache.beam.sdk.schemas.Schema dataSchema)
        Produce a SchemaIO given a String representing the data's location, the schema of the data that resides there, and some IO-specific configuration object.
        Specified by:
        from in interface org.apache.beam.sdk.schemas.io.SchemaIOProvider
      • requiresDataSchema

        public boolean requiresDataSchema()
        Specified by:
        requiresDataSchema in interface org.apache.beam.sdk.schemas.io.SchemaIOProvider
      • isBounded

        public org.apache.beam.sdk.values.PCollection.IsBounded isBounded()
        Specified by:
        isBounded in interface org.apache.beam.sdk.schemas.io.SchemaIOProvider