예제 #1
0
파일: TPut.cs 프로젝트: hnxxd/MyHbase
    public void Read(TProtocol iprot)
    {
        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)
                {
                    Row = iprot.ReadBinary();
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            case 2:
                if (field.Type == TType.List)
                {
                    {
                        ColumnValues = new List <TColumnValue>();
                        TList _list17 = iprot.ReadListBegin();
                        for (int _i18 = 0; _i18 < _list17.Count; ++_i18)
                        {
                            TColumnValue _elem19 = new TColumnValue();
                            _elem19 = new TColumnValue();
                            _elem19.Read(iprot);
                            ColumnValues.Add(_elem19);
                        }
                        iprot.ReadListEnd();
                    }
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            case 3:
                if (field.Type == TType.I64)
                {
                    Timestamp = iprot.ReadI64();
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            case 5:
                if (field.Type == TType.Map)
                {
                    {
                        Attributes = new Dictionary <byte[], byte[]>();
                        TMap _map20 = iprot.ReadMapBegin();
                        for (int _i21 = 0; _i21 < _map20.Count; ++_i21)
                        {
                            byte[] _key22;
                            byte[] _val23;
                            _key22             = iprot.ReadBinary();
                            _val23             = iprot.ReadBinary();
                            Attributes[_key22] = _val23;
                        }
                        iprot.ReadMapEnd();
                    }
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

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

            case 7:
                if (field.Type == TType.Struct)
                {
                    CellVisibility = new TCellVisibility();
                    CellVisibility.Read(iprot);
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            default:
                TProtocolUtil.Skip(iprot, field.Type);
                break;
            }
            iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
    }
예제 #2
0
    public void Read(TProtocol iprot)
    {
        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)
                {
                    Row = iprot.ReadBinary();
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            case 2:
                if (field.Type == TType.List)
                {
                    {
                        Columns = new List <TColumnValue>();
                        TList _list44 = iprot.ReadListBegin();
                        for (int _i45 = 0; _i45 < _list44.Count; ++_i45)
                        {
                            TColumnValue _elem46 = new TColumnValue();
                            _elem46 = new TColumnValue();
                            _elem46.Read(iprot);
                            Columns.Add(_elem46);
                        }
                        iprot.ReadListEnd();
                    }
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            case 3:
                if (field.Type == TType.Map)
                {
                    {
                        Attributes = new Dictionary <byte[], byte[]>();
                        TMap _map47 = iprot.ReadMapBegin();
                        for (int _i48 = 0; _i48 < _map47.Count; ++_i48)
                        {
                            byte[] _key49;
                            byte[] _val50;
                            _key49             = iprot.ReadBinary();
                            _val50             = iprot.ReadBinary();
                            Attributes[_key49] = _val50;
                        }
                        iprot.ReadMapEnd();
                    }
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

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

            case 5:
                if (field.Type == TType.Struct)
                {
                    CellVisibility = new TCellVisibility();
                    CellVisibility.Read(iprot);
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            default:
                TProtocolUtil.Skip(iprot, field.Type);
                break;
            }
            iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
    }
예제 #3
0
    public void Read(TProtocol iprot)
    {
        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)
                {
                    Row = iprot.ReadBinary();
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            case 2:
                if (field.Type == TType.List)
                {
                    {
                        Columns = new List <TColumnIncrement>();
                        TList _list35 = iprot.ReadListBegin();
                        for (int _i36 = 0; _i36 < _list35.Count; ++_i36)
                        {
                            TColumnIncrement _elem37 = new TColumnIncrement();
                            _elem37 = new TColumnIncrement();
                            _elem37.Read(iprot);
                            Columns.Add(_elem37);
                        }
                        iprot.ReadListEnd();
                    }
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            case 4:
                if (field.Type == TType.Map)
                {
                    {
                        Attributes = new Dictionary <byte[], byte[]>();
                        TMap _map38 = iprot.ReadMapBegin();
                        for (int _i39 = 0; _i39 < _map38.Count; ++_i39)
                        {
                            byte[] _key40;
                            byte[] _val41;
                            _key40             = iprot.ReadBinary();
                            _val41             = iprot.ReadBinary();
                            Attributes[_key40] = _val41;
                        }
                        iprot.ReadMapEnd();
                    }
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

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

            case 6:
                if (field.Type == TType.Struct)
                {
                    CellVisibility = new TCellVisibility();
                    CellVisibility.Read(iprot);
                }
                else
                {
                    TProtocolUtil.Skip(iprot, field.Type);
                }
                break;

            default:
                TProtocolUtil.Skip(iprot, field.Type);
                break;
            }
            iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
    }