- 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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCompression()
Gets the name of the compression method used when writing the file.org.apache.avro.Schema
getSchema()
Gets the schema used to write the file.static AvroMetadata
load(FileClient fileClient, Path path)
Loads metadata from the specified Avro formatted file.static AvroMetadata
load(FileClient fileClient, File file)
Loads metadata from the specified Avro formatted file.static AvroMetadata
load(FileClient fileClient, String fileName)
Loads metadata from the specified Avro formatted file.
-
-
-
Method Detail
-
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 clientfileName
- 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 clientfile
- 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 clientpath
- the Avro file from which to load metadata
-
-