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:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>getCreatedBy()Map<String,Set<String>>getKeyValueMetaData()org.apache.parquet.schema.MessageTypegetSchema()FileMetaDatamerge()Will merge the metadata as if it was coming from a single file.FileMetaDatamerge(KeyValueMetadataMergeStrategy keyValueMetadataMergeStrategy)Will merge the metadata as if it was coming from a single file.StringtoString()
-
-
-
Constructor Detail
-
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 fileskeyValueMetaData- the merged app specific metadatacreatedBy- the description of the library that created the file- Throws:
NullPointerException- if schema or keyValueMetaData isnull
-
-
Method Detail
-
getSchema
public org.apache.parquet.schema.MessageType getSchema()
- Returns:
- the schema for the file
-
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
-
-