Class AvroMetadata

java.lang.Object
com.pervasive.datarush.operators.io.avro.AvroMetadata

public class AvroMetadata extends Object
Represents metadata associated with an Avro formatted file. Not all metadata is exposed; only the write schema and compression format are accessible.
  • Method Details

    • getSchema

      public org.apache.avro.Schema getSchema()
      Gets the schema used to write the file.
      Returns:
      the schema of the source file
    • getCompression

      public String getCompression()
      Gets the name of the compression method used when writing the file.
      Returns:
      the identifier for the compression method
    • load

      public static AvroMetadata load(FileClient fileClient, String fileName)
      Loads metadata from the specified Avro formatted file.
      Parameters:
      fileClient - the client
      fileName - the name of the Avro file from which to load metadata
    • load

      public static AvroMetadata load(FileClient fileClient, File file)
      Loads metadata from the specified Avro formatted file.
      Parameters:
      fileClient - the client
      file - the Avro file from which to load metadata
    • load

      public static AvroMetadata load(FileClient fileClient, Path path)
      Loads metadata from the specified Avro formatted file.
      Parameters:
      fileClient - the client
      path - the Avro file from which to load metadata