Class GlobalMetaData

java.lang.Object
org.apache.parquet.hadoop.metadata.GlobalMetaData
All Implemented Interfaces:
Serializable

public class GlobalMetaData extends Object implements Serializable
Merged metadata when reading from multiple files. THis is to allow schema evolution
See Also:
  • Constructor Details

    • GlobalMetaData

      public GlobalMetaData(org.apache.parquet.schema.MessageType schema, Map<String,Set<String>> keyValueMetaData, Set<String> createdBy)
      Parameters:
      schema - the union of the schemas for all the files
      keyValueMetaData - the merged app specific metadata
      createdBy - the description of the library that created the file
      Throws:
      NullPointerException - if schema or keyValueMetaData is null
  • Method Details

    • getSchema

      public org.apache.parquet.schema.MessageType getSchema()
      Returns:
      the schema for the file
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getKeyValueMetaData

      public Map<String,Set<String>> getKeyValueMetaData()
      Returns:
      meta data for extensions
    • getCreatedBy

      public Set<String> getCreatedBy()
      Returns:
      the description of the library that created the file
    • merge

      public FileMetaData merge()
      Will merge the metadata as if it was coming from a single file. (for all part files written together this will always work) If there are conflicting values an exception will be thrown

      Provided for backward compatibility

      Returns:
      the merged version of this
    • merge

      public FileMetaData merge(KeyValueMetadataMergeStrategy keyValueMetadataMergeStrategy)
      Will merge the metadata as if it was coming from a single file. (for all part files written together this will always work) If there are conflicting values an exception will be thrown
      Returns:
      the merged version of this