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
-
-
Constructor Summary
Constructors Constructor Description GlobalMetaData(MessageType schema, Map<String,Set<String>> keyValueMetaData, Set<String> createdBy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
getCreatedBy()
Map<String,Set<String>>
getKeyValueMetaData()
MessageType
getSchema()
FileMetaData
merge()
Will merge the metadata as if it was coming from a single file.FileMetaData
merge(KeyValueMetadataMergeStrategy keyValueMetadataMergeStrategy)
Will merge the metadata as if it was coming from a single file.String
toString()
-
-
-
Constructor Detail
-
GlobalMetaData
public GlobalMetaData(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 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
-
-