예제 #1
0
    public void Read(TProtocol iprot)
    {
        bool   isset_acked          = false;
        bool   isset_failed         = false;
        bool   isset_process_ms_avg = false;
        bool   isset_executed       = false;
        bool   isset_execute_ms_avg = 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.Map)
                {
                    {
                        Acked = new Dictionary <string, Dictionary <GlobalStreamId, long> >();
                        TMap _map45 = iprot.ReadMapBegin();
                        for (int _i46 = 0; _i46 < _map45.Count; ++_i46)
                        {
                            string _key47;
                            Dictionary <GlobalStreamId, long> _val48;
                            _key47 = iprot.ReadString();
                            {
                                _val48 = new Dictionary <GlobalStreamId, long>();
                                TMap _map49 = iprot.ReadMapBegin();
                                for (int _i50 = 0; _i50 < _map49.Count; ++_i50)
                                {
                                    GlobalStreamId _key51;
                                    long           _val52;
                                    _key51 = new GlobalStreamId();
                                    _key51.Read(iprot);
                                    _val52         = iprot.ReadI64();
                                    _val48[_key51] = _val52;
                                }
                                iprot.ReadMapEnd();
                            }
                            Acked[_key47] = _val48;
                        }
                        iprot.ReadMapEnd();
                    }
                    isset_acked = true;
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            case 2:
                if (field.Type == TType.Map)
                {
                    {
                        Failed = new Dictionary <string, Dictionary <GlobalStreamId, long> >();
                        TMap _map53 = iprot.ReadMapBegin();
                        for (int _i54 = 0; _i54 < _map53.Count; ++_i54)
                        {
                            string _key55;
                            Dictionary <GlobalStreamId, long> _val56;
                            _key55 = iprot.ReadString();
                            {
                                _val56 = new Dictionary <GlobalStreamId, long>();
                                TMap _map57 = iprot.ReadMapBegin();
                                for (int _i58 = 0; _i58 < _map57.Count; ++_i58)
                                {
                                    GlobalStreamId _key59;
                                    long           _val60;
                                    _key59 = new GlobalStreamId();
                                    _key59.Read(iprot);
                                    _val60         = iprot.ReadI64();
                                    _val56[_key59] = _val60;
                                }
                                iprot.ReadMapEnd();
                            }
                            Failed[_key55] = _val56;
                        }
                        iprot.ReadMapEnd();
                    }
                    isset_failed = true;
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            case 3:
                if (field.Type == TType.Map)
                {
                    {
                        Process_ms_avg = new Dictionary <string, Dictionary <GlobalStreamId, double> >();
                        TMap _map61 = iprot.ReadMapBegin();
                        for (int _i62 = 0; _i62 < _map61.Count; ++_i62)
                        {
                            string _key63;
                            Dictionary <GlobalStreamId, double> _val64;
                            _key63 = iprot.ReadString();
                            {
                                _val64 = new Dictionary <GlobalStreamId, double>();
                                TMap _map65 = iprot.ReadMapBegin();
                                for (int _i66 = 0; _i66 < _map65.Count; ++_i66)
                                {
                                    GlobalStreamId _key67;
                                    double         _val68;
                                    _key67 = new GlobalStreamId();
                                    _key67.Read(iprot);
                                    _val68         = iprot.ReadDouble();
                                    _val64[_key67] = _val68;
                                }
                                iprot.ReadMapEnd();
                            }
                            Process_ms_avg[_key63] = _val64;
                        }
                        iprot.ReadMapEnd();
                    }
                    isset_process_ms_avg = true;
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            case 4:
                if (field.Type == TType.Map)
                {
                    {
                        Executed = new Dictionary <string, Dictionary <GlobalStreamId, long> >();
                        TMap _map69 = iprot.ReadMapBegin();
                        for (int _i70 = 0; _i70 < _map69.Count; ++_i70)
                        {
                            string _key71;
                            Dictionary <GlobalStreamId, long> _val72;
                            _key71 = iprot.ReadString();
                            {
                                _val72 = new Dictionary <GlobalStreamId, long>();
                                TMap _map73 = iprot.ReadMapBegin();
                                for (int _i74 = 0; _i74 < _map73.Count; ++_i74)
                                {
                                    GlobalStreamId _key75;
                                    long           _val76;
                                    _key75 = new GlobalStreamId();
                                    _key75.Read(iprot);
                                    _val76         = iprot.ReadI64();
                                    _val72[_key75] = _val76;
                                }
                                iprot.ReadMapEnd();
                            }
                            Executed[_key71] = _val72;
                        }
                        iprot.ReadMapEnd();
                    }
                    isset_executed = true;
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            case 5:
                if (field.Type == TType.Map)
                {
                    {
                        Execute_ms_avg = new Dictionary <string, Dictionary <GlobalStreamId, double> >();
                        TMap _map77 = iprot.ReadMapBegin();
                        for (int _i78 = 0; _i78 < _map77.Count; ++_i78)
                        {
                            string _key79;
                            Dictionary <GlobalStreamId, double> _val80;
                            _key79 = iprot.ReadString();
                            {
                                _val80 = new Dictionary <GlobalStreamId, double>();
                                TMap _map81 = iprot.ReadMapBegin();
                                for (int _i82 = 0; _i82 < _map81.Count; ++_i82)
                                {
                                    GlobalStreamId _key83;
                                    double         _val84;
                                    _key83 = new GlobalStreamId();
                                    _key83.Read(iprot);
                                    _val84         = iprot.ReadDouble();
                                    _val80[_key83] = _val84;
                                }
                                iprot.ReadMapEnd();
                            }
                            Execute_ms_avg[_key79] = _val80;
                        }
                        iprot.ReadMapEnd();
                    }
                    isset_execute_ms_avg = true;
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            default:
                TProtocolUtil.Skip(iprot, field.Type);
                break;
            }
            iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
        if (!isset_acked)
        {
            throw new TProtocolException(TProtocolException.INVALID_DATA);
        }
        if (!isset_failed)
        {
            throw new TProtocolException(TProtocolException.INVALID_DATA);
        }
        if (!isset_process_ms_avg)
        {
            throw new TProtocolException(TProtocolException.INVALID_DATA);
        }
        if (!isset_executed)
        {
            throw new TProtocolException(TProtocolException.INVALID_DATA);
        }
        if (!isset_execute_ms_avg)
        {
            throw new TProtocolException(TProtocolException.INVALID_DATA);
        }
    }
예제 #2
0
 public void Read (TProtocol iprot)
 {
   bool isset_acked = false;
   bool isset_failed = false;
   bool isset_process_ms_avg = false;
   bool isset_executed = false;
   bool isset_execute_ms_avg = 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.Map) {
           {
             Acked = new Dictionary<string, Dictionary<GlobalStreamId, long>>();
             TMap _map45 = iprot.ReadMapBegin();
             for( int _i46 = 0; _i46 < _map45.Count; ++_i46)
             {
               string _key47;
               Dictionary<GlobalStreamId, long> _val48;
               _key47 = iprot.ReadString();
               {
                 _val48 = new Dictionary<GlobalStreamId, long>();
                 TMap _map49 = iprot.ReadMapBegin();
                 for( int _i50 = 0; _i50 < _map49.Count; ++_i50)
                 {
                   GlobalStreamId _key51;
                   long _val52;
                   _key51 = new GlobalStreamId();
                   _key51.Read(iprot);
                   _val52 = iprot.ReadI64();
                   _val48[_key51] = _val52;
                 }
                 iprot.ReadMapEnd();
               }
               Acked[_key47] = _val48;
             }
             iprot.ReadMapEnd();
           }
           isset_acked = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Map) {
           {
             Failed = new Dictionary<string, Dictionary<GlobalStreamId, long>>();
             TMap _map53 = iprot.ReadMapBegin();
             for( int _i54 = 0; _i54 < _map53.Count; ++_i54)
             {
               string _key55;
               Dictionary<GlobalStreamId, long> _val56;
               _key55 = iprot.ReadString();
               {
                 _val56 = new Dictionary<GlobalStreamId, long>();
                 TMap _map57 = iprot.ReadMapBegin();
                 for( int _i58 = 0; _i58 < _map57.Count; ++_i58)
                 {
                   GlobalStreamId _key59;
                   long _val60;
                   _key59 = new GlobalStreamId();
                   _key59.Read(iprot);
                   _val60 = iprot.ReadI64();
                   _val56[_key59] = _val60;
                 }
                 iprot.ReadMapEnd();
               }
               Failed[_key55] = _val56;
             }
             iprot.ReadMapEnd();
           }
           isset_failed = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Map) {
           {
             Process_ms_avg = new Dictionary<string, Dictionary<GlobalStreamId, double>>();
             TMap _map61 = iprot.ReadMapBegin();
             for( int _i62 = 0; _i62 < _map61.Count; ++_i62)
             {
               string _key63;
               Dictionary<GlobalStreamId, double> _val64;
               _key63 = iprot.ReadString();
               {
                 _val64 = new Dictionary<GlobalStreamId, double>();
                 TMap _map65 = iprot.ReadMapBegin();
                 for( int _i66 = 0; _i66 < _map65.Count; ++_i66)
                 {
                   GlobalStreamId _key67;
                   double _val68;
                   _key67 = new GlobalStreamId();
                   _key67.Read(iprot);
                   _val68 = iprot.ReadDouble();
                   _val64[_key67] = _val68;
                 }
                 iprot.ReadMapEnd();
               }
               Process_ms_avg[_key63] = _val64;
             }
             iprot.ReadMapEnd();
           }
           isset_process_ms_avg = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.Map) {
           {
             Executed = new Dictionary<string, Dictionary<GlobalStreamId, long>>();
             TMap _map69 = iprot.ReadMapBegin();
             for( int _i70 = 0; _i70 < _map69.Count; ++_i70)
             {
               string _key71;
               Dictionary<GlobalStreamId, long> _val72;
               _key71 = iprot.ReadString();
               {
                 _val72 = new Dictionary<GlobalStreamId, long>();
                 TMap _map73 = iprot.ReadMapBegin();
                 for( int _i74 = 0; _i74 < _map73.Count; ++_i74)
                 {
                   GlobalStreamId _key75;
                   long _val76;
                   _key75 = new GlobalStreamId();
                   _key75.Read(iprot);
                   _val76 = iprot.ReadI64();
                   _val72[_key75] = _val76;
                 }
                 iprot.ReadMapEnd();
               }
               Executed[_key71] = _val72;
             }
             iprot.ReadMapEnd();
           }
           isset_executed = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 5:
         if (field.Type == TType.Map) {
           {
             Execute_ms_avg = new Dictionary<string, Dictionary<GlobalStreamId, double>>();
             TMap _map77 = iprot.ReadMapBegin();
             for( int _i78 = 0; _i78 < _map77.Count; ++_i78)
             {
               string _key79;
               Dictionary<GlobalStreamId, double> _val80;
               _key79 = iprot.ReadString();
               {
                 _val80 = new Dictionary<GlobalStreamId, double>();
                 TMap _map81 = iprot.ReadMapBegin();
                 for( int _i82 = 0; _i82 < _map81.Count; ++_i82)
                 {
                   GlobalStreamId _key83;
                   double _val84;
                   _key83 = new GlobalStreamId();
                   _key83.Read(iprot);
                   _val84 = iprot.ReadDouble();
                   _val80[_key83] = _val84;
                 }
                 iprot.ReadMapEnd();
               }
               Execute_ms_avg[_key79] = _val80;
             }
             iprot.ReadMapEnd();
           }
           isset_execute_ms_avg = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_acked)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_failed)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_process_ms_avg)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_executed)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_execute_ms_avg)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
예제 #3
0
 public void Read (TProtocol iprot)
 {
   bool isset_inputs = false;
   bool isset_streams = 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.Map) {
           {
             Inputs = new Dictionary<GlobalStreamId, Grouping>();
             TMap _map12 = iprot.ReadMapBegin();
             for( int _i13 = 0; _i13 < _map12.Count; ++_i13)
             {
               GlobalStreamId _key14;
               Grouping _val15;
               _key14 = new GlobalStreamId();
               _key14.Read(iprot);
               _val15 = new Grouping();
               _val15.Read(iprot);
               Inputs[_key14] = _val15;
             }
             iprot.ReadMapEnd();
           }
           isset_inputs = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Map) {
           {
             Streams = new Dictionary<string, StreamInfo>();
             TMap _map16 = iprot.ReadMapBegin();
             for( int _i17 = 0; _i17 < _map16.Count; ++_i17)
             {
               string _key18;
               StreamInfo _val19;
               _key18 = iprot.ReadString();
               _val19 = new StreamInfo();
               _val19.Read(iprot);
               Streams[_key18] = _val19;
             }
             iprot.ReadMapEnd();
           }
           isset_streams = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.I32) {
           Parallelism_hint = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.String) {
           Json_conf = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_inputs)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_streams)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
예제 #4
0
    public void Read(TProtocol iprot)
    {
        bool   isset_inputs  = false;
        bool   isset_streams = 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.Map)
                {
                    {
                        Inputs = new Dictionary <GlobalStreamId, Grouping>();
                        TMap _map12 = iprot.ReadMapBegin();
                        for (int _i13 = 0; _i13 < _map12.Count; ++_i13)
                        {
                            GlobalStreamId _key14;
                            Grouping       _val15;
                            _key14 = new GlobalStreamId();
                            _key14.Read(iprot);
                            _val15 = new Grouping();
                            _val15.Read(iprot);
                            Inputs[_key14] = _val15;
                        }
                        iprot.ReadMapEnd();
                    }
                    isset_inputs = true;
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            case 2:
                if (field.Type == TType.Map)
                {
                    {
                        Streams = new Dictionary <string, StreamInfo>();
                        TMap _map16 = iprot.ReadMapBegin();
                        for (int _i17 = 0; _i17 < _map16.Count; ++_i17)
                        {
                            string     _key18;
                            StreamInfo _val19;
                            _key18 = iprot.ReadString();
                            _val19 = new StreamInfo();
                            _val19.Read(iprot);
                            Streams[_key18] = _val19;
                        }
                        iprot.ReadMapEnd();
                    }
                    isset_streams = true;
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            case 3:
                if (field.Type == TType.I32)
                {
                    Parallelism_hint = iprot.ReadI32();
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            case 4:
                if (field.Type == TType.String)
                {
                    Json_conf = iprot.ReadString();
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            default:
                TProtocolUtil.Skip(iprot, field.Type);
                break;
            }
            iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
        if (!isset_inputs)
        {
            throw new TProtocolException(TProtocolException.INVALID_DATA);
        }
        if (!isset_streams)
        {
            throw new TProtocolException(TProtocolException.INVALID_DATA);
        }
    }