@Override public void read(org.apache.thrift.protocol.TProtocol prot, Graph struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.nodeType = org.apache.hadoop.hive.ql.plan.api.NodeType.findByValue(iprot.readI32()); struct.setNodeTypeIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list18 = new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.roots = new ArrayList<String>(_list18.size); String _elem19; for (int _i20 = 0; _i20 < _list18.size; ++_i20) { _elem19 = iprot.readString(); struct.roots.add(_elem19); } } struct.setRootsIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.adjacencyList = new ArrayList<Adjacency>(_list21.size); Adjacency _elem22; for (int _i23 = 0; _i23 < _list21.size; ++_i23) { _elem22 = new Adjacency(); _elem22.read(iprot); struct.adjacencyList.add(_elem22); } } struct.setAdjacencyListIsSet(true); } }
public void read(org.apache.thrift.protocol.TProtocol iprot, Graph 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: // NODE_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.nodeType = org.apache.hadoop.hive.ql.plan.api.NodeType.findByValue(iprot.readI32()); struct.setNodeTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ROOTS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); struct.roots = new ArrayList<String>(_list8.size); String _elem9; for (int _i10 = 0; _i10 < _list8.size; ++_i10) { _elem9 = iprot.readString(); struct.roots.add(_elem9); } iprot.readListEnd(); } struct.setRootsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // ADJACENCY_LIST if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list11 = iprot.readListBegin(); struct.adjacencyList = new ArrayList<Adjacency>(_list11.size); Adjacency _elem12; for (int _i13 = 0; _i13 < _list11.size; ++_i13) { _elem12 = new Adjacency(); _elem12.read(iprot); struct.adjacencyList.add(_elem12); } iprot.readListEnd(); } struct.setAdjacencyListIsSet(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(); }