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(); }