public boolean equals(SkewedInfo that) { if (that == null) return false; boolean this_present_skewedColNames = true && this.isSetSkewedColNames(); boolean that_present_skewedColNames = true && that.isSetSkewedColNames(); if (this_present_skewedColNames || that_present_skewedColNames) { if (!(this_present_skewedColNames && that_present_skewedColNames)) return false; if (!this.skewedColNames.equals(that.skewedColNames)) return false; } boolean this_present_skewedColValues = true && this.isSetSkewedColValues(); boolean that_present_skewedColValues = true && that.isSetSkewedColValues(); if (this_present_skewedColValues || that_present_skewedColValues) { if (!(this_present_skewedColValues && that_present_skewedColValues)) return false; if (!this.skewedColValues.equals(that.skewedColValues)) return false; } boolean this_present_skewedColValueLocationMaps = true && this.isSetSkewedColValueLocationMaps(); boolean that_present_skewedColValueLocationMaps = true && that.isSetSkewedColValueLocationMaps(); if (this_present_skewedColValueLocationMaps || that_present_skewedColValueLocationMaps) { if (!(this_present_skewedColValueLocationMaps && that_present_skewedColValueLocationMaps)) return false; if (!this.skewedColValueLocationMaps.equals(that.skewedColValueLocationMaps)) return false; } return true; }
/** Performs a deep copy on <i>other</i>. */ public SkewedInfo(SkewedInfo other) { if (other.isSetSkewedColNames()) { List<String> __this__skewedColNames = new ArrayList<String>(); for (String other_element : other.skewedColNames) { __this__skewedColNames.add(other_element); } this.skewedColNames = __this__skewedColNames; } if (other.isSetSkewedColValues()) { List<List<String>> __this__skewedColValues = new ArrayList<List<String>>(); for (List<String> other_element : other.skewedColValues) { List<String> __this__skewedColValues_copy = new ArrayList<String>(); for (String other_element_element : other_element) { __this__skewedColValues_copy.add(other_element_element); } __this__skewedColValues.add(__this__skewedColValues_copy); } this.skewedColValues = __this__skewedColValues; } if (other.isSetSkewedColValueLocationMaps()) { Map<List<String>, String> __this__skewedColValueLocationMaps = new HashMap<List<String>, String>(); for (Map.Entry<List<String>, String> other_element : other.skewedColValueLocationMaps.entrySet()) { List<String> other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); List<String> __this__skewedColValueLocationMaps_copy_key = new ArrayList<String>(); for (String other_element_key_element : other_element_key) { __this__skewedColValueLocationMaps_copy_key.add(other_element_key_element); } String __this__skewedColValueLocationMaps_copy_value = other_element_value; __this__skewedColValueLocationMaps.put( __this__skewedColValueLocationMaps_copy_key, __this__skewedColValueLocationMaps_copy_value); } this.skewedColValueLocationMaps = __this__skewedColValueLocationMaps; } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, SkewedInfo struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSkewedColNames()) { optionals.set(0); } if (struct.isSetSkewedColValues()) { optionals.set(1); } if (struct.isSetSkewedColValueLocationMaps()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSkewedColNames()) { { oprot.writeI32(struct.skewedColNames.size()); for (String _iter135 : struct.skewedColNames) { oprot.writeString(_iter135); } } } if (struct.isSetSkewedColValues()) { { oprot.writeI32(struct.skewedColValues.size()); for (List<String> _iter136 : struct.skewedColValues) { { oprot.writeI32(_iter136.size()); for (String _iter137 : _iter136) { oprot.writeString(_iter137); } } } } } if (struct.isSetSkewedColValueLocationMaps()) { { oprot.writeI32(struct.skewedColValueLocationMaps.size()); for (Map.Entry<List<String>, String> _iter138 : struct.skewedColValueLocationMaps.entrySet()) { { oprot.writeI32(_iter138.getKey().size()); for (String _iter139 : _iter138.getKey()) { oprot.writeString(_iter139); } } oprot.writeString(_iter138.getValue()); } } } }
public int compareTo(SkewedInfo other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; SkewedInfo typedOther = (SkewedInfo) other; lastComparison = Boolean.valueOf(isSetSkewedColNames()).compareTo(typedOther.isSetSkewedColNames()); if (lastComparison != 0) { return lastComparison; } if (isSetSkewedColNames()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skewedColNames, typedOther.skewedColNames); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSkewedColValues()).compareTo(typedOther.isSetSkewedColValues()); if (lastComparison != 0) { return lastComparison; } if (isSetSkewedColValues()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skewedColValues, typedOther.skewedColValues); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSkewedColValueLocationMaps()) .compareTo(typedOther.isSetSkewedColValueLocationMaps()); if (lastComparison != 0) { return lastComparison; } if (isSetSkewedColValueLocationMaps()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo( this.skewedColValueLocationMaps, typedOther.skewedColValueLocationMaps); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, SkewedInfo struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list140 = new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.skewedColNames = new ArrayList<String>(_list140.size); for (int _i141 = 0; _i141 < _list140.size; ++_i141) { String _elem142; // required _elem142 = iprot.readString(); struct.skewedColNames.add(_elem142); } } struct.setSkewedColNamesIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list143 = new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.LIST, iprot.readI32()); struct.skewedColValues = new ArrayList<List<String>>(_list143.size); for (int _i144 = 0; _i144 < _list143.size; ++_i144) { List<String> _elem145; // required { org.apache.thrift.protocol.TList _list146 = new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRING, iprot.readI32()); _elem145 = new ArrayList<String>(_list146.size); for (int _i147 = 0; _i147 < _list146.size; ++_i147) { String _elem148; // required _elem148 = iprot.readString(); _elem145.add(_elem148); } } struct.skewedColValues.add(_elem145); } } struct.setSkewedColValuesIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TMap _map149 = new org.apache.thrift.protocol.TMap( org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.skewedColValueLocationMaps = new HashMap<List<String>, String>(2 * _map149.size); for (int _i150 = 0; _i150 < _map149.size; ++_i150) { List<String> _key151; // required String _val152; // required { org.apache.thrift.protocol.TList _list153 = new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRING, iprot.readI32()); _key151 = new ArrayList<String>(_list153.size); for (int _i154 = 0; _i154 < _list153.size; ++_i154) { String _elem155; // required _elem155 = iprot.readString(); _key151.add(_elem155); } } _val152 = iprot.readString(); struct.skewedColValueLocationMaps.put(_key151, _val152); } } struct.setSkewedColValueLocationMapsIsSet(true); } }
public void write(org.apache.thrift.protocol.TProtocol oprot, SkewedInfo struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.skewedColNames != null) { oprot.writeFieldBegin(SKEWED_COL_NAMES_FIELD_DESC); { oprot.writeListBegin( new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRING, struct.skewedColNames.size())); for (String _iter130 : struct.skewedColNames) { oprot.writeString(_iter130); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.skewedColValues != null) { oprot.writeFieldBegin(SKEWED_COL_VALUES_FIELD_DESC); { oprot.writeListBegin( new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.LIST, struct.skewedColValues.size())); for (List<String> _iter131 : struct.skewedColValues) { { oprot.writeListBegin( new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRING, _iter131.size())); for (String _iter132 : _iter131) { oprot.writeString(_iter132); } oprot.writeListEnd(); } } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.skewedColValueLocationMaps != null) { oprot.writeFieldBegin(SKEWED_COL_VALUE_LOCATION_MAPS_FIELD_DESC); { oprot.writeMapBegin( new org.apache.thrift.protocol.TMap( org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.STRING, struct.skewedColValueLocationMaps.size())); for (Map.Entry<List<String>, String> _iter133 : struct.skewedColValueLocationMaps.entrySet()) { { oprot.writeListBegin( new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRING, _iter133.getKey().size())); for (String _iter134 : _iter133.getKey()) { oprot.writeString(_iter134); } oprot.writeListEnd(); } oprot.writeString(_iter133.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void read(org.apache.thrift.protocol.TProtocol iprot, SkewedInfo struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SKEWED_COL_NAMES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list114 = iprot.readListBegin(); struct.skewedColNames = new ArrayList<String>(_list114.size); for (int _i115 = 0; _i115 < _list114.size; ++_i115) { String _elem116; // required _elem116 = iprot.readString(); struct.skewedColNames.add(_elem116); } iprot.readListEnd(); } struct.setSkewedColNamesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // SKEWED_COL_VALUES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list117 = iprot.readListBegin(); struct.skewedColValues = new ArrayList<List<String>>(_list117.size); for (int _i118 = 0; _i118 < _list117.size; ++_i118) { List<String> _elem119; // required { org.apache.thrift.protocol.TList _list120 = iprot.readListBegin(); _elem119 = new ArrayList<String>(_list120.size); for (int _i121 = 0; _i121 < _list120.size; ++_i121) { String _elem122; // required _elem122 = iprot.readString(); _elem119.add(_elem122); } iprot.readListEnd(); } struct.skewedColValues.add(_elem119); } iprot.readListEnd(); } struct.setSkewedColValuesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SKEWED_COL_VALUE_LOCATION_MAPS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map123 = iprot.readMapBegin(); struct.skewedColValueLocationMaps = new HashMap<List<String>, String>(2 * _map123.size); for (int _i124 = 0; _i124 < _map123.size; ++_i124) { List<String> _key125; // required String _val126; // required { org.apache.thrift.protocol.TList _list127 = iprot.readListBegin(); _key125 = new ArrayList<String>(_list127.size); for (int _i128 = 0; _i128 < _list127.size; ++_i128) { String _elem129; // required _elem129 = iprot.readString(); _key125.add(_elem129); } iprot.readListEnd(); } _val126 = iprot.readString(); struct.skewedColValueLocationMaps.put(_key125, _val126); } iprot.readMapEnd(); } struct.setSkewedColValueLocationMapsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); }