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