java.lang.Object
com.pervasive.datarush.operators.io.avro.AvroMetadata
Represents metadata associated with an Avro formatted file.
Not all metadata is exposed; only the write schema and
compression format are accessible.
-
Method Summary
Modifier and TypeMethodDescriptionGets the name of the compression method used when writing the file.org.apache.avro.SchemaGets the schema used to write the file.static AvroMetadataload(FileClient fileClient, Path path) Loads metadata from the specified Avro formatted file.static AvroMetadataload(FileClient fileClient, File file) Loads metadata from the specified Avro formatted file.static AvroMetadataload(FileClient fileClient, String fileName) Loads metadata from the specified Avro formatted file.
-
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
Gets the name of the compression method used when writing the file.- Returns:
- the identifier for the compression method
-
load
Loads metadata from the specified Avro formatted file.- Parameters:
fileClient- the clientfileName- the name of the Avro file from which to load metadata
-
load
Loads metadata from the specified Avro formatted file.- Parameters:
fileClient- the clientfile- the Avro file from which to load metadata
-
load
Loads metadata from the specified Avro formatted file.- Parameters:
fileClient- the clientpath- the Avro file from which to load metadata
-