![JAR search and dependency download from the Maven repository](/logo.png)
org.apache.parquet.format.RowGroup Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of parquet-format Show documentation
Show all versions of parquet-format Show documentation
Parquet is a columnar storage format that supports nested data. This provides all generated metadata code.
/**
* Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.parquet.format;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2017-10-17")
public class RowGroup implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RowGroup");
private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField TOTAL_BYTE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("total_byte_size", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField NUM_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("num_rows", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField SORTING_COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("sorting_columns", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new RowGroupStandardSchemeFactory());
schemes.put(TupleScheme.class, new RowGroupTupleSchemeFactory());
}
/**
* Metadata for each column chunk in this row group.
* This list must have the same order as the SchemaElement list in FileMetaData.
*
*/
public List columns; // required
/**
* Total byte size of all the uncompressed column data in this row group *
*/
public long total_byte_size; // required
/**
* Number of rows in this row group *
*/
public long num_rows; // required
/**
* If set, specifies a sort ordering of the rows in this RowGroup.
* The sorting columns can be a subset of all the columns.
*/
public List sorting_columns; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* Metadata for each column chunk in this row group.
* This list must have the same order as the SchemaElement list in FileMetaData.
*
*/
COLUMNS((short)1, "columns"),
/**
* Total byte size of all the uncompressed column data in this row group *
*/
TOTAL_BYTE_SIZE((short)2, "total_byte_size"),
/**
* Number of rows in this row group *
*/
NUM_ROWS((short)3, "num_rows"),
/**
* If set, specifies a sort ordering of the rows in this RowGroup.
* The sorting columns can be a subset of all the columns.
*/
SORTING_COLUMNS((short)4, "sorting_columns");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // COLUMNS
return COLUMNS;
case 2: // TOTAL_BYTE_SIZE
return TOTAL_BYTE_SIZE;
case 3: // NUM_ROWS
return NUM_ROWS;
case 4: // SORTING_COLUMNS
return SORTING_COLUMNS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __TOTAL_BYTE_SIZE_ISSET_ID = 0;
private static final int __NUM_ROWS_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.SORTING_COLUMNS};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnChunk.class))));
tmpMap.put(_Fields.TOTAL_BYTE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("total_byte_size", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.NUM_ROWS, new org.apache.thrift.meta_data.FieldMetaData("num_rows", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.SORTING_COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("sorting_columns", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SortingColumn.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RowGroup.class, metaDataMap);
}
public RowGroup() {
}
public RowGroup(
List columns,
long total_byte_size,
long num_rows)
{
this();
this.columns = columns;
this.total_byte_size = total_byte_size;
setTotal_byte_sizeIsSet(true);
this.num_rows = num_rows;
setNum_rowsIsSet(true);
}
/**
* Performs a deep copy on other.
*/
public RowGroup(RowGroup other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetColumns()) {
List __this__columns = new ArrayList(other.columns.size());
for (ColumnChunk other_element : other.columns) {
__this__columns.add(new ColumnChunk(other_element));
}
this.columns = __this__columns;
}
this.total_byte_size = other.total_byte_size;
this.num_rows = other.num_rows;
if (other.isSetSorting_columns()) {
List __this__sorting_columns = new ArrayList(other.sorting_columns.size());
for (SortingColumn other_element : other.sorting_columns) {
__this__sorting_columns.add(new SortingColumn(other_element));
}
this.sorting_columns = __this__sorting_columns;
}
}
public RowGroup deepCopy() {
return new RowGroup(this);
}
@Override
public void clear() {
this.columns = null;
setTotal_byte_sizeIsSet(false);
this.total_byte_size = 0;
setNum_rowsIsSet(false);
this.num_rows = 0;
this.sorting_columns = null;
}
public int getColumnsSize() {
return (this.columns == null) ? 0 : this.columns.size();
}
public java.util.Iterator getColumnsIterator() {
return (this.columns == null) ? null : this.columns.iterator();
}
public void addToColumns(ColumnChunk elem) {
if (this.columns == null) {
this.columns = new ArrayList();
}
this.columns.add(elem);
}
/**
* Metadata for each column chunk in this row group.
* This list must have the same order as the SchemaElement list in FileMetaData.
*
*/
public List getColumns() {
return this.columns;
}
/**
* Metadata for each column chunk in this row group.
* This list must have the same order as the SchemaElement list in FileMetaData.
*
*/
public RowGroup setColumns(List columns) {
this.columns = columns;
return this;
}
public void unsetColumns() {
this.columns = null;
}
/** Returns true if field columns is set (has been assigned a value) and false otherwise */
public boolean isSetColumns() {
return this.columns != null;
}
public void setColumnsIsSet(boolean value) {
if (!value) {
this.columns = null;
}
}
/**
* Total byte size of all the uncompressed column data in this row group *
*/
public long getTotal_byte_size() {
return this.total_byte_size;
}
/**
* Total byte size of all the uncompressed column data in this row group *
*/
public RowGroup setTotal_byte_size(long total_byte_size) {
this.total_byte_size = total_byte_size;
setTotal_byte_sizeIsSet(true);
return this;
}
public void unsetTotal_byte_size() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOTAL_BYTE_SIZE_ISSET_ID);
}
/** Returns true if field total_byte_size is set (has been assigned a value) and false otherwise */
public boolean isSetTotal_byte_size() {
return EncodingUtils.testBit(__isset_bitfield, __TOTAL_BYTE_SIZE_ISSET_ID);
}
public void setTotal_byte_sizeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTAL_BYTE_SIZE_ISSET_ID, value);
}
/**
* Number of rows in this row group *
*/
public long getNum_rows() {
return this.num_rows;
}
/**
* Number of rows in this row group *
*/
public RowGroup setNum_rows(long num_rows) {
this.num_rows = num_rows;
setNum_rowsIsSet(true);
return this;
}
public void unsetNum_rows() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_ROWS_ISSET_ID);
}
/** Returns true if field num_rows is set (has been assigned a value) and false otherwise */
public boolean isSetNum_rows() {
return EncodingUtils.testBit(__isset_bitfield, __NUM_ROWS_ISSET_ID);
}
public void setNum_rowsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_ROWS_ISSET_ID, value);
}
public int getSorting_columnsSize() {
return (this.sorting_columns == null) ? 0 : this.sorting_columns.size();
}
public java.util.Iterator getSorting_columnsIterator() {
return (this.sorting_columns == null) ? null : this.sorting_columns.iterator();
}
public void addToSorting_columns(SortingColumn elem) {
if (this.sorting_columns == null) {
this.sorting_columns = new ArrayList();
}
this.sorting_columns.add(elem);
}
/**
* If set, specifies a sort ordering of the rows in this RowGroup.
* The sorting columns can be a subset of all the columns.
*/
public List getSorting_columns() {
return this.sorting_columns;
}
/**
* If set, specifies a sort ordering of the rows in this RowGroup.
* The sorting columns can be a subset of all the columns.
*/
public RowGroup setSorting_columns(List sorting_columns) {
this.sorting_columns = sorting_columns;
return this;
}
public void unsetSorting_columns() {
this.sorting_columns = null;
}
/** Returns true if field sorting_columns is set (has been assigned a value) and false otherwise */
public boolean isSetSorting_columns() {
return this.sorting_columns != null;
}
public void setSorting_columnsIsSet(boolean value) {
if (!value) {
this.sorting_columns = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case COLUMNS:
if (value == null) {
unsetColumns();
} else {
setColumns((List)value);
}
break;
case TOTAL_BYTE_SIZE:
if (value == null) {
unsetTotal_byte_size();
} else {
setTotal_byte_size((Long)value);
}
break;
case NUM_ROWS:
if (value == null) {
unsetNum_rows();
} else {
setNum_rows((Long)value);
}
break;
case SORTING_COLUMNS:
if (value == null) {
unsetSorting_columns();
} else {
setSorting_columns((List)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case COLUMNS:
return getColumns();
case TOTAL_BYTE_SIZE:
return getTotal_byte_size();
case NUM_ROWS:
return getNum_rows();
case SORTING_COLUMNS:
return getSorting_columns();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case COLUMNS:
return isSetColumns();
case TOTAL_BYTE_SIZE:
return isSetTotal_byte_size();
case NUM_ROWS:
return isSetNum_rows();
case SORTING_COLUMNS:
return isSetSorting_columns();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof RowGroup)
return this.equals((RowGroup)that);
return false;
}
public boolean equals(RowGroup that) {
if (that == null)
return false;
boolean this_present_columns = true && this.isSetColumns();
boolean that_present_columns = true && that.isSetColumns();
if (this_present_columns || that_present_columns) {
if (!(this_present_columns && that_present_columns))
return false;
if (!this.columns.equals(that.columns))
return false;
}
boolean this_present_total_byte_size = true;
boolean that_present_total_byte_size = true;
if (this_present_total_byte_size || that_present_total_byte_size) {
if (!(this_present_total_byte_size && that_present_total_byte_size))
return false;
if (this.total_byte_size != that.total_byte_size)
return false;
}
boolean this_present_num_rows = true;
boolean that_present_num_rows = true;
if (this_present_num_rows || that_present_num_rows) {
if (!(this_present_num_rows && that_present_num_rows))
return false;
if (this.num_rows != that.num_rows)
return false;
}
boolean this_present_sorting_columns = true && this.isSetSorting_columns();
boolean that_present_sorting_columns = true && that.isSetSorting_columns();
if (this_present_sorting_columns || that_present_sorting_columns) {
if (!(this_present_sorting_columns && that_present_sorting_columns))
return false;
if (!this.sorting_columns.equals(that.sorting_columns))
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy