Class FileMetaData

java.lang.Object
org.apache.parquet.format.FileMetaData
All Implemented Interfaces:
Serializable, Cloneable, Comparable<FileMetaData>, org.apache.thrift.TBase<FileMetaData,FileMetaData._Fields>, org.apache.thrift.TSerializable

@Generated(value="Autogenerated by Thrift Compiler (0.23.0)", date="2026-08-06") public class FileMetaData extends Object implements org.apache.thrift.TBase<FileMetaData,FileMetaData._Fields>, Serializable, Cloneable, Comparable<FileMetaData>
Description for file metadata
See Also:
  • Field Details

    • version

      public int version
      Version of this file As of December 2025, there is no agreed upon consensus of what constitutes version 2 of the file. For maximum compatibility with readers, writers should always populate "1" for version. For maximum compatibility with writers, readers should accept "1" and "2" interchangeably. All other versions are reserved for potential future use-cases.
    • schema

      public List<SchemaElement> schema
      Parquet schema for this file. This schema contains metadata for all the columns. The schema is represented as a tree with a single root. The nodes of the tree are flattened to a list by doing a depth-first traversal. The column metadata contains the path in the schema for that column which can be used to map columns to nodes in the schema. The first element is the root *
    • num_rows

      public long num_rows
      Number of rows in this file *
    • row_groups

      public List<RowGroup> row_groups
      Row groups in this file *
    • key_value_metadata

      public List<KeyValue> key_value_metadata
      Optional key/value metadata *
    • created_by

      public String created_by
      String for application that wrote this file. This should be in the format version (build ). e.g. impala version 1.0 (build 6cf94d29b2b7115df4de2c06e2ab4326d721eb55)
    • column_orders

      public List<ColumnOrder> column_orders
      Sort order used for the min_value and max_value fields in the Statistics objects and the min_values and max_values fields in the ColumnIndex objects of each column in this file. Sort orders are listed in the order matching the columns in the schema. The indexes are not necessarily the same though, because only leaf nodes of the schema are represented in the list of sort orders. Without column_orders, the meaning of the min_value and max_value fields in the Statistics object and the ColumnIndex object is undefined. To ensure well-defined behaviour, if these fields are written to a Parquet file, column_orders must be written as well. The obsolete min and max fields in the Statistics object are always sorted by signed comparison regardless of column_orders.
    • encryption_algorithm

      public EncryptionAlgorithm encryption_algorithm
      Encryption algorithm. This field is set only in encrypted files with plaintext footer. Files with encrypted footer store algorithm id in FileCryptoMetaData structure.
    • metaDataMap

      public static final Map<FileMetaData._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
  • Constructor Details

    • FileMetaData

      public FileMetaData()
    • FileMetaData

      public FileMetaData(int version, List<SchemaElement> schema, long num_rows, List<RowGroup> row_groups)
    • FileMetaData

      public FileMetaData(FileMetaData other)
      Performs a deep copy on other.
  • Method Details

    • deepCopy

      public FileMetaData deepCopy()
      Specified by:
      deepCopy in interface org.apache.thrift.TBase<FileMetaData,FileMetaData._Fields>
    • clear

      public void clear()
      Specified by:
      clear in interface org.apache.thrift.TBase<FileMetaData,FileMetaData._Fields>
    • getVersion

      public int getVersion()
      Version of this file As of December 2025, there is no agreed upon consensus of what constitutes version 2 of the file. For maximum compatibility with readers, writers should always populate "1" for version. For maximum compatibility with writers, readers should accept "1" and "2" interchangeably. All other versions are reserved for potential future use-cases.
    • setVersion

      public FileMetaData setVersion(int version)
      Version of this file As of December 2025, there is no agreed upon consensus of what constitutes version 2 of the file. For maximum compatibility with readers, writers should always populate "1" for version. For maximum compatibility with writers, readers should accept "1" and "2" interchangeably. All other versions are reserved for potential future use-cases.
    • unsetVersion

      public void unsetVersion()
    • isSetVersion

      public boolean isSetVersion()
      Returns true if field version is set (has been assigned a value) and false otherwise
    • setVersionIsSet

      public void setVersionIsSet(boolean value)
    • getSchemaSize

      public int getSchemaSize()
    • getSchemaIterator

      public Iterator<SchemaElement> getSchemaIterator()
    • addToSchema

      public void addToSchema(SchemaElement elem)
    • getSchema

      public List<SchemaElement> getSchema()
      Parquet schema for this file. This schema contains metadata for all the columns. The schema is represented as a tree with a single root. The nodes of the tree are flattened to a list by doing a depth-first traversal. The column metadata contains the path in the schema for that column which can be used to map columns to nodes in the schema. The first element is the root *
    • setSchema

      public FileMetaData setSchema(List<SchemaElement> schema)
      Parquet schema for this file. This schema contains metadata for all the columns. The schema is represented as a tree with a single root. The nodes of the tree are flattened to a list by doing a depth-first traversal. The column metadata contains the path in the schema for that column which can be used to map columns to nodes in the schema. The first element is the root *
    • unsetSchema

      public void unsetSchema()
    • isSetSchema

      public boolean isSetSchema()
      Returns true if field schema is set (has been assigned a value) and false otherwise
    • setSchemaIsSet

      public void setSchemaIsSet(boolean value)
    • getNum_rows

      public long getNum_rows()
      Number of rows in this file *
    • setNum_rows

      public FileMetaData setNum_rows(long num_rows)
      Number of rows in this file *
    • unsetNum_rows

      public void unsetNum_rows()
    • isSetNum_rows

      public boolean isSetNum_rows()
      Returns true if field num_rows is set (has been assigned a value) and false otherwise
    • setNum_rowsIsSet

      public void setNum_rowsIsSet(boolean value)
    • getRow_groupsSize

      public int getRow_groupsSize()
    • getRow_groupsIterator

      public Iterator<RowGroup> getRow_groupsIterator()
    • addToRow_groups

      public void addToRow_groups(RowGroup elem)
    • getRow_groups

      public List<RowGroup> getRow_groups()
      Row groups in this file *
    • setRow_groups

      public FileMetaData setRow_groups(List<RowGroup> row_groups)
      Row groups in this file *
    • unsetRow_groups

      public void unsetRow_groups()
    • isSetRow_groups

      public boolean isSetRow_groups()
      Returns true if field row_groups is set (has been assigned a value) and false otherwise
    • setRow_groupsIsSet

      public void setRow_groupsIsSet(boolean value)
    • getKey_value_metadataSize

      public int getKey_value_metadataSize()
    • getKey_value_metadataIterator

      public Iterator<KeyValue> getKey_value_metadataIterator()
    • addToKey_value_metadata

      public void addToKey_value_metadata(KeyValue elem)
    • getKey_value_metadata

      public List<KeyValue> getKey_value_metadata()
      Optional key/value metadata *
    • setKey_value_metadata

      public FileMetaData setKey_value_metadata(List<KeyValue> key_value_metadata)
      Optional key/value metadata *
    • unsetKey_value_metadata

      public void unsetKey_value_metadata()
    • isSetKey_value_metadata

      public boolean isSetKey_value_metadata()
      Returns true if field key_value_metadata is set (has been assigned a value) and false otherwise
    • setKey_value_metadataIsSet

      public void setKey_value_metadataIsSet(boolean value)
    • getCreated_by

      public String getCreated_by()
      String for application that wrote this file. This should be in the format version (build ). e.g. impala version 1.0 (build 6cf94d29b2b7115df4de2c06e2ab4326d721eb55)
    • setCreated_by

      public FileMetaData setCreated_by(String created_by)
      String for application that wrote this file. This should be in the format version (build ). e.g. impala version 1.0 (build 6cf94d29b2b7115df4de2c06e2ab4326d721eb55)
    • unsetCreated_by

      public void unsetCreated_by()
    • isSetCreated_by

      public boolean isSetCreated_by()
      Returns true if field created_by is set (has been assigned a value) and false otherwise
    • setCreated_byIsSet

      public void setCreated_byIsSet(boolean value)
    • getColumn_ordersSize

      public int getColumn_ordersSize()
    • getColumn_ordersIterator

      public Iterator<ColumnOrder> getColumn_ordersIterator()
    • addToColumn_orders

      public void addToColumn_orders(ColumnOrder elem)
    • getColumn_orders

      public List<ColumnOrder> getColumn_orders()
      Sort order used for the min_value and max_value fields in the Statistics objects and the min_values and max_values fields in the ColumnIndex objects of each column in this file. Sort orders are listed in the order matching the columns in the schema. The indexes are not necessarily the same though, because only leaf nodes of the schema are represented in the list of sort orders. Without column_orders, the meaning of the min_value and max_value fields in the Statistics object and the ColumnIndex object is undefined. To ensure well-defined behaviour, if these fields are written to a Parquet file, column_orders must be written as well. The obsolete min and max fields in the Statistics object are always sorted by signed comparison regardless of column_orders.
    • setColumn_orders

      public FileMetaData setColumn_orders(List<ColumnOrder> column_orders)
      Sort order used for the min_value and max_value fields in the Statistics objects and the min_values and max_values fields in the ColumnIndex objects of each column in this file. Sort orders are listed in the order matching the columns in the schema. The indexes are not necessarily the same though, because only leaf nodes of the schema are represented in the list of sort orders. Without column_orders, the meaning of the min_value and max_value fields in the Statistics object and the ColumnIndex object is undefined. To ensure well-defined behaviour, if these fields are written to a Parquet file, column_orders must be written as well. The obsolete min and max fields in the Statistics object are always sorted by signed comparison regardless of column_orders.
    • unsetColumn_orders

      public void unsetColumn_orders()
    • isSetColumn_orders

      public boolean isSetColumn_orders()
      Returns true if field column_orders is set (has been assigned a value) and false otherwise
    • setColumn_ordersIsSet

      public void setColumn_ordersIsSet(boolean value)
    • getEncryption_algorithm

      public EncryptionAlgorithm getEncryption_algorithm()
      Encryption algorithm. This field is set only in encrypted files with plaintext footer. Files with encrypted footer store algorithm id in FileCryptoMetaData structure.
    • setEncryption_algorithm

      public FileMetaData setEncryption_algorithm(EncryptionAlgorithm encryption_algorithm)
      Encryption algorithm. This field is set only in encrypted files with plaintext footer. Files with encrypted footer store algorithm id in FileCryptoMetaData structure.
    • unsetEncryption_algorithm

      public void unsetEncryption_algorithm()
    • isSetEncryption_algorithm

      public boolean isSetEncryption_algorithm()
      Returns true if field encryption_algorithm is set (has been assigned a value) and false otherwise
    • setEncryption_algorithmIsSet

      public void setEncryption_algorithmIsSet(boolean value)
    • getFooter_signing_key_metadata

      public byte[] getFooter_signing_key_metadata()
      Retrieval metadata of key used for signing the footer. Used only in encrypted files with plaintext footer.
    • bufferForFooter_signing_key_metadata

      public ByteBuffer bufferForFooter_signing_key_metadata()
    • setFooter_signing_key_metadata

      public FileMetaData setFooter_signing_key_metadata(byte[] footer_signing_key_metadata)
      Retrieval metadata of key used for signing the footer. Used only in encrypted files with plaintext footer.
    • setFooter_signing_key_metadata

      public FileMetaData setFooter_signing_key_metadata(ByteBuffer footer_signing_key_metadata)
    • unsetFooter_signing_key_metadata

      public void unsetFooter_signing_key_metadata()
    • isSetFooter_signing_key_metadata

      public boolean isSetFooter_signing_key_metadata()
      Returns true if field footer_signing_key_metadata is set (has been assigned a value) and false otherwise
    • setFooter_signing_key_metadataIsSet

      public void setFooter_signing_key_metadataIsSet(boolean value)
    • setFieldValue

      public void setFieldValue(FileMetaData._Fields field, Object value)
      Specified by:
      setFieldValue in interface org.apache.thrift.TBase<FileMetaData,FileMetaData._Fields>
    • getFieldValue

      public Object getFieldValue(FileMetaData._Fields field)
      Specified by:
      getFieldValue in interface org.apache.thrift.TBase<FileMetaData,FileMetaData._Fields>
    • isSet

      public boolean isSet(FileMetaData._Fields field)
      Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
      Specified by:
      isSet in interface org.apache.thrift.TBase<FileMetaData,FileMetaData._Fields>
    • equals

      public boolean equals(Object that)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(FileMetaData that)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(FileMetaData other)
      Specified by:
      compareTo in interface Comparable<FileMetaData>
    • fieldForId

      public FileMetaData._Fields fieldForId(int fieldId)
      Specified by:
      fieldForId in interface org.apache.thrift.TBase<FileMetaData,FileMetaData._Fields>
    • read

      public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException
      Specified by:
      read in interface org.apache.thrift.TSerializable
      Throws:
      org.apache.thrift.TException
    • write

      public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException
      Specified by:
      write in interface org.apache.thrift.TSerializable
      Throws:
      org.apache.thrift.TException
    • toString

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

      public void validate() throws org.apache.thrift.TException
      Throws:
      org.apache.thrift.TException