public void Read(TProtocol iprot) { bool isset_master_code_dir = false; TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.String) { Master_code_dir = iprot.ReadString(); isset_master_code_dir = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Map) { { Node_host = new Dictionary <string, string>(); TMap _map274 = iprot.ReadMapBegin(); for (int _i275 = 0; _i275 < _map274.Count; ++_i275) { string _key276; string _val277; _key276 = iprot.ReadString(); _val277 = iprot.ReadString(); Node_host[_key276] = _val277; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Map) { { Executor_node_port = new Dictionary <List <long>, NodeInfo>(); TMap _map278 = iprot.ReadMapBegin(); for (int _i279 = 0; _i279 < _map278.Count; ++_i279) { List <long> _key280; NodeInfo _val281; { _key280 = new List <long>(); TList _list282 = iprot.ReadListBegin(); for (int _i283 = 0; _i283 < _list282.Count; ++_i283) { long _elem284 = 0; _elem284 = iprot.ReadI64(); _key280.Add(_elem284); } iprot.ReadListEnd(); } _val281 = new NodeInfo(); _val281.Read(iprot); Executor_node_port[_key280] = _val281; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.Map) { { Executor_start_time_secs = new Dictionary <List <long>, long>(); TMap _map285 = iprot.ReadMapBegin(); for (int _i286 = 0; _i286 < _map285.Count; ++_i286) { List <long> _key287; long _val288; { _key287 = new List <long>(); TList _list289 = iprot.ReadListBegin(); for (int _i290 = 0; _i290 < _list289.Count; ++_i290) { long _elem291 = 0; _elem291 = iprot.ReadI64(); _key287.Add(_elem291); } iprot.ReadListEnd(); } _val288 = iprot.ReadI64(); Executor_start_time_secs[_key287] = _val288; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.Map) { { Worker_resources = new Dictionary <NodeInfo, WorkerResources>(); TMap _map292 = iprot.ReadMapBegin(); for (int _i293 = 0; _i293 < _map292.Count; ++_i293) { NodeInfo _key294; WorkerResources _val295; _key294 = new NodeInfo(); _key294.Read(iprot); _val295 = new WorkerResources(); _val295.Read(iprot); Worker_resources[_key294] = _val295; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_master_code_dir) { throw new TProtocolException(TProtocolException.INVALID_DATA); } }
public void Read(TProtocol iprot) { bool isset_topology_id = false; bool isset_executors = false; TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.String) { Topology_id = iprot.ReadString(); isset_topology_id = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.List) { { Executors = new List <ExecutorInfo>(); TList _list322 = iprot.ReadListBegin(); for (int _i323 = 0; _i323 < _list322.Count; ++_i323) { ExecutorInfo _elem324 = new ExecutorInfo(); _elem324 = new ExecutorInfo(); _elem324.Read(iprot); Executors.Add(_elem324); } iprot.ReadListEnd(); } isset_executors = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Struct) { Resources = new WorkerResources(); Resources.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_topology_id) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_executors) { throw new TProtocolException(TProtocolException.INVALID_DATA); } }