@Override public Map<String, List<ColumnStatisticsObj>> getPartitionColumnStatistics(String databaseName, String tableName, List<String> partitionNames, List<String> columnNames) throws TException { PartitionsStatsRequest partitionsStatsRequest = new PartitionsStatsRequest(databaseName, tableName, columnNames, partitionNames); return client.get_partitions_statistics_req(partitionsStatsRequest).getPartStats(); }
public PartitionsStatsResult deepCopy() { return new PartitionsStatsResult(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof PartitionsStatsResult) return this.equals((PartitionsStatsResult)that); return false; }
public Object getFieldValue(_Fields field) { switch (field) { case PART_STATS: return getPartStats(); case IS_STATS_COMPLIANT: return isIsStatsCompliant(); } throw new IllegalStateException(); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case PART_STATS: if (value == null) { unsetPartStats(); } else { setPartStats((Map<String,List<ColumnStatisticsObj>>)value); } break; case IS_STATS_COMPLIANT: if (value == null) { unsetIsStatsCompliant(); } else { setIsStatsCompliant((Boolean)value); } break; } }
/** 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 PART_STATS: return isSetPartStats(); case IS_STATS_COMPLIANT: return isSetIsStatsCompliant(); } throw new IllegalStateException(); }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetPartStats()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'partStats' is unset! Struct:" + toString()); } // check for sub-struct validity }
/** * Performs a deep copy on <i>other</i>. */ public PartitionsStatsResult(PartitionsStatsResult other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetPartStats()) { Map<String,List<ColumnStatisticsObj>> __this__partStats = new HashMap<String,List<ColumnStatisticsObj>>(other.partStats.size()); for (Map.Entry<String, List<ColumnStatisticsObj>> other_element : other.partStats.entrySet()) { String other_element_key = other_element.getKey(); List<ColumnStatisticsObj> other_element_value = other_element.getValue(); String __this__partStats_copy_key = other_element_key; List<ColumnStatisticsObj> __this__partStats_copy_value = new ArrayList<ColumnStatisticsObj>(other_element_value.size()); for (ColumnStatisticsObj other_element_value_element : other_element_value) { __this__partStats_copy_value.add(new ColumnStatisticsObj(other_element_value_element)); } __this__partStats.put(__this__partStats_copy_key, __this__partStats_copy_value); } this.partStats = __this__partStats; } this.isStatsCompliant = other.isStatsCompliant; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case PART_STATS: if (value == null) { unsetPartStats(); } else { setPartStats((Map<String,List<ColumnStatisticsObj>>)value); } break; } }
struct.setPartStatsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
struct.setPartStatsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.isStatsCompliant = iprot.readBool(); struct.setIsStatsCompliantIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
public void write(org.apache.thrift.protocol.TProtocol oprot, PartitionsStatsResult struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.partStats != null) { oprot.writeFieldBegin(PART_STATS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, struct.partStats.size())); for (Map.Entry<String, List<ColumnStatisticsObj>> _iter345 : struct.partStats.entrySet()) { oprot.writeString(_iter345.getKey()); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter345.getValue().size())); for (ColumnStatisticsObj _iter346 : _iter345.getValue()) { _iter346.write(oprot); } oprot.writeListEnd(); } } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, PartitionsStatsResult struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; { org.apache.thrift.protocol.TMap _map349 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); struct.partStats = new HashMap<String,List<ColumnStatisticsObj>>(2*_map349.size); for (int _i350 = 0; _i350 < _map349.size; ++_i350) { String _key351; // required List<ColumnStatisticsObj> _val352; // required _key351 = iprot.readString(); { org.apache.thrift.protocol.TList _list353 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); _val352 = new ArrayList<ColumnStatisticsObj>(_list353.size); for (int _i354 = 0; _i354 < _list353.size; ++_i354) { ColumnStatisticsObj _elem355; // optional _elem355 = new ColumnStatisticsObj(); _elem355.read(iprot); _val352.add(_elem355); } } struct.partStats.put(_key351, _val352); } } struct.setPartStatsIsSet(true); } }
public void write(org.apache.thrift.protocol.TProtocol oprot, PartitionsStatsResult struct) throws org.apache.thrift.TException { struct.validate(); if (struct.isSetIsStatsCompliant()) { oprot.writeFieldBegin(IS_STATS_COMPLIANT_FIELD_DESC); oprot.writeBool(struct.isStatsCompliant);
struct.setPartStatsIsSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.isStatsCompliant = iprot.readBool(); struct.setIsStatsCompliantIsSet(true);
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetPartStats()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'partStats' is unset! Struct:" + toString()); } // check for sub-struct validity }
public boolean equals(PartitionsStatsResult that) { if (that == null) return false; boolean this_present_partStats = true && this.isSetPartStats(); boolean that_present_partStats = true && that.isSetPartStats(); if (this_present_partStats || that_present_partStats) { if (!(this_present_partStats && that_present_partStats)) return false; if (!this.partStats.equals(that.partStats)) return false; } return true; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case PART_STATS: if (value == null) { unsetPartStats(); } else { setPartStats((Map<String,List<ColumnStatisticsObj>>)value); } break; } }
struct.setPartStatsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();