@Override public List<ColumnStatisticsObj> getTableColumnStatistics(String databaseName, String tableName, List<String> columnNames) throws TException { TableStatsRequest tableStatsRequest = new TableStatsRequest(databaseName, tableName, columnNames); return client.get_table_statistics_req(tableStatsRequest).getTableStats(); }
public TableStatsResult deepCopy() { return new TableStatsResult(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TableStatsResult) return this.equals((TableStatsResult)that); return false; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case TABLE_STATS: if (value == null) { unsetTableStats(); } else { setTableStats((List<ColumnStatisticsObj>)value); } break; case IS_STATS_COMPLIANT: if (value == null) { unsetIsStatsCompliant(); } else { setIsStatsCompliant((Boolean)value); } break; } }
public Object getFieldValue(_Fields field) { switch (field) { case TABLE_STATS: return getTableStats(); case IS_STATS_COMPLIANT: return isIsStatsCompliant(); } 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 TABLE_STATS: return isSetTableStats(); case IS_STATS_COMPLIANT: return isSetIsStatsCompliant(); } throw new IllegalStateException(); }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetTableStats()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableStats' is unset! Struct:" + toString()); } // check for sub-struct validity }
/** * Performs a deep copy on <i>other</i>. */ public TableStatsResult(TableStatsResult other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetTableStats()) { List<ColumnStatisticsObj> __this__tableStats = new ArrayList<ColumnStatisticsObj>(other.tableStats.size()); for (ColumnStatisticsObj other_element : other.tableStats) { __this__tableStats.add(new ColumnStatisticsObj(other_element)); } this.tableStats = __this__tableStats; } this.isStatsCompliant = other.isStatsCompliant; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case TABLE_STATS: if (value == null) { unsetTableStats(); } else { setTableStats((List<ColumnStatisticsObj>)value); } break; } }
struct.setTableStatsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
struct.setTableStatsIsSet(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); } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, TableStatsResult struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; { org.apache.thrift.protocol.TList _list335 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.tableStats = new ArrayList<ColumnStatisticsObj>(_list335.size); for (int _i336 = 0; _i336 < _list335.size; ++_i336) { ColumnStatisticsObj _elem337; // optional _elem337 = new ColumnStatisticsObj(); _elem337.read(iprot); struct.tableStats.add(_elem337); } } struct.setTableStatsIsSet(true); } }
public void write(org.apache.thrift.protocol.TProtocol oprot, TableStatsResult struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.tableStats != null) { oprot.writeFieldBegin(TABLE_STATS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tableStats.size())); for (ColumnStatisticsObj _iter333 : struct.tableStats) { _iter333.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, TableStatsResult struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.tableStats != null) { oprot.writeFieldBegin(TABLE_STATS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tableStats.size())); for (ColumnStatisticsObj _iter435 : struct.tableStats) { _iter435.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.isSetIsStatsCompliant()) { oprot.writeFieldBegin(IS_STATS_COMPLIANT_FIELD_DESC); oprot.writeBool(struct.isStatsCompliant); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, TableStatsResult struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; { org.apache.thrift.protocol.TList _list437 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.tableStats = new ArrayList<ColumnStatisticsObj>(_list437.size); ColumnStatisticsObj _elem438; for (int _i439 = 0; _i439 < _list437.size; ++_i439) { _elem438 = new ColumnStatisticsObj(); _elem438.read(iprot); struct.tableStats.add(_elem438); } } struct.setTableStatsIsSet(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 (!isSetTableStats()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableStats' is unset! Struct:" + toString()); } // check for sub-struct validity }
public boolean equals(TableStatsResult that) { if (that == null) return false; boolean this_present_tableStats = true && this.isSetTableStats(); boolean that_present_tableStats = true && that.isSetTableStats(); if (this_present_tableStats || that_present_tableStats) { if (!(this_present_tableStats && that_present_tableStats)) return false; if (!this.tableStats.equals(that.tableStats)) return false; } return true; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case TABLE_STATS: if (value == null) { unsetTableStats(); } else { setTableStats((List<ColumnStatisticsObj>)value); } break; } }
struct.setTableStatsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();