コード例 #1
0
    public void read(org.apache.thrift.protocol.TProtocol iprot, RebalanceOptions 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: // WAIT_SECS
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.wait_secs = iprot.readI32();
              struct.setWait_secsIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // NUM_WORKERS
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.num_workers = iprot.readI32();
              struct.setNum_workersIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // NUM_EXECUTORS
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map316 = iprot.readMapBegin();
                struct.num_executors = new HashMap<String, Integer>(2 * _map316.size);
                for (int _i317 = 0; _i317 < _map316.size; ++_i317) {
                  String _key318; // required
                  int _val319; // required
                  _key318 = iprot.readString();
                  _val319 = iprot.readI32();
                  struct.num_executors.put(_key318, _val319);
                }
                iprot.readMapEnd();
              }
              struct.setNum_executorsIsSet(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();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }
コード例 #2
0
ファイル: ClusterData.java プロジェクト: chiqing/serengeti-ws
    public void read(org.apache.thrift.protocol.TProtocol iprot, ClusterData 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: // CLUSTER_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.clusterName = iprot.readString();
              struct.setClusterNameIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // GROUPS
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map8 = iprot.readMapBegin();
                struct.groups = new HashMap<String, GroupData>(2 * _map8.size);
                for (int _i9 = 0; _i9 < _map8.size; ++_i9) {
                  String _key10; // required
                  GroupData _val11; // required
                  _key10 = iprot.readString();
                  _val11 = new GroupData();
                  _val11.read(iprot);
                  struct.groups.put(_key10, _val11);
                }
                iprot.readMapEnd();
              }
              struct.setGroupsIsSet(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();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }
コード例 #3
0
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      _Fields fieldId = _Fields.findByThriftId(field.id);
      if (fieldId == null) {
        TProtocolUtil.skip(iprot, field.type);
      } else {
        switch (fieldId) {
          case ROW:
            if (field.type == TType.STRING) {
              this.row = iprot.readBinary();
            } else {
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case COLUMNS:
            if (field.type == TType.MAP) {
              {
                TMap _map4 = iprot.readMapBegin();
                this.columns = new HashMap<byte[], TCell>(2 * _map4.size);
                for (int _i5 = 0; _i5 < _map4.size; ++_i5) {
                  byte[] _key6;
                  TCell _val7;
                  _key6 = iprot.readBinary();
                  _val7 = new TCell();
                  _val7.read(iprot);
                  this.columns.put(_key6, _val7);
                }
                iprot.readMapEnd();
              }
            } else {
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
        }
        iprot.readFieldEnd();
      }
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }
コード例 #4
0
ファイル: Type.java プロジェクト: 123divyanshsingh/nuERP-old
    public void read(org.apache.thrift.protocol.TProtocol iprot, Type 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: // TYPES
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
                struct.types = new HashMap<Integer, Typ>(2 * _map0.size);
                for (int _i1 = 0; _i1 < _map0.size; ++_i1) {
                  int _key2; // required
                  Typ _val3; // required
                  _key2 = iprot.readI32();
                  _val3 = new Typ();
                  _val3.read(iprot);
                  struct.types.put(_key2, _val3);
                }
                iprot.readMapEnd();
              }
              struct.setTypesIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // ROOT
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.root = iprot.readI32();
              struct.setRootIsSet(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();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }
コード例 #5
0
ファイル: AggregationInfo.java プロジェクト: xiaotui/pinot
 public void read(org.apache.thrift.protocol.TProtocol iprot, AggregationInfo 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: // AGGREGATION_TYPE
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.aggregationType = iprot.readString();
           struct.setAggregationTypeIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 2: // AGGREGATION_PARAMS
         if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
           {
             org.apache.thrift.protocol.TMap _map26 = iprot.readMapBegin();
             struct.aggregationParams = new HashMap<String, String>(2 * _map26.size);
             String _key27;
             String _val28;
             for (int _i29 = 0; _i29 < _map26.size; ++_i29) {
               _key27 = iprot.readString();
               _val28 = iprot.readString();
               struct.aggregationParams.put(_key27, _val28);
             }
             iprot.readMapEnd();
           }
           struct.setAggregationParamsIsSet(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();
 }
コード例 #6
0
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    org.apache.thrift.protocol.TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == org.apache.thrift.protocol.TType.STOP) {
        break;
      }
      switch (field.id) {
        case 1: // CREDENTIALS
          if (field.type == org.apache.thrift.protocol.TType.MAP) {
            {
              org.apache.thrift.protocol.TMap _map24 = iprot.readMapBegin();
              this.credentials = new HashMap<String, String>(2 * _map24.size);
              for (int _i25 = 0; _i25 < _map24.size; ++_i25) {
                String _key26;
                String _val27;
                _key26 = iprot.readString();
                _val27 = iprot.readString();
                this.credentials.put(_key26, _val27);
              }
              iprot.readMapEnd();
            }
          } else {
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }
コード例 #7
0
ファイル: SkewedInfo.java プロジェクト: sushrutikhar/hive
 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();
 }
コード例 #8
0
ファイル: IteratorSetting.java プロジェクト: harayz/accumulo
    public void read(org.apache.thrift.protocol.TProtocol iprot, IteratorSetting 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: // PRIORITY
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.priority = iprot.readI32();
              struct.setPriorityIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.name = iprot.readString();
              struct.setNameIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // ITERATOR_CLASS
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.iteratorClass = iprot.readString();
              struct.setIteratorClassIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // PROPERTIES
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map16 = iprot.readMapBegin();
                struct.properties = new HashMap<String, String>(2 * _map16.size);
                for (int _i17 = 0; _i17 < _map16.size; ++_i17) {
                  String _key18; // required
                  String _val19; // required
                  _key18 = iprot.readString();
                  _val19 = iprot.readString();
                  struct.properties.put(_key18, _val19);
                }
                iprot.readMapEnd();
              }
              struct.setPropertiesIsSet(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();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }
コード例 #9
0
 public void read(org.apache.thrift.protocol.TProtocol iprot, ClusterWorkerHeartbeat 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: // STORM_ID
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.storm_id = iprot.readString();
           struct.set_storm_id_isSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 2: // EXECUTOR_STATS
         if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
           {
             org.apache.thrift.protocol.TMap _map608 = iprot.readMapBegin();
             struct.executor_stats = new HashMap<ExecutorInfo, ExecutorStats>(2 * _map608.size);
             ExecutorInfo _key609;
             ExecutorStats _val610;
             for (int _i611 = 0; _i611 < _map608.size; ++_i611) {
               _key609 = new ExecutorInfo();
               _key609.read(iprot);
               _val610 = new ExecutorStats();
               _val610.read(iprot);
               struct.executor_stats.put(_key609, _val610);
             }
             iprot.readMapEnd();
           }
           struct.set_executor_stats_isSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 3: // TIME_SECS
         if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
           struct.time_secs = iprot.readI32();
           struct.set_time_secs_isSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 4: // UPTIME_SECS
         if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
           struct.uptime_secs = iprot.readI32();
           struct.set_uptime_secs_isSet(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();
 }
コード例 #10
0
 public void read(org.apache.thrift.protocol.TProtocol iprot, ResourceJobManager 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: // RESOURCE_JOB_MANAGER_ID
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.resourceJobManagerId = iprot.readString();
           struct.setResourceJobManagerIdIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 2: // RESOURCE_JOB_MANAGER_TYPE
         if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
           struct.resourceJobManagerType =
               org.apache.airavata.model.appcatalog.computeresource.ResourceJobManagerType
                   .findByValue(iprot.readI32());
           struct.setResourceJobManagerTypeIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 3: // PUSH_MONITORING_ENDPOINT
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.pushMonitoringEndpoint = iprot.readString();
           struct.setPushMonitoringEndpointIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 4: // JOB_MANAGER_BIN_PATH
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.jobManagerBinPath = iprot.readString();
           struct.setJobManagerBinPathIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 5: // JOB_MANAGER_COMMANDS
         if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
           {
             org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
             struct.jobManagerCommands = new HashMap<JobManagerCommand, String>(2 * _map0.size);
             JobManagerCommand _key1;
             String _val2;
             for (int _i3 = 0; _i3 < _map0.size; ++_i3) {
               _key1 =
                   org.apache.airavata.model.appcatalog.computeresource.JobManagerCommand
                       .findByValue(iprot.readI32());
               _val2 = iprot.readString();
               struct.jobManagerCommands.put(_key1, _val2);
             }
             iprot.readMapEnd();
           }
           struct.setJobManagerCommandsIsSet(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();
 }
コード例 #11
0
ファイル: TDelete.java プロジェクト: JichengSong/hbase
    public void read(org.apache.thrift.protocol.TProtocol iprot, TDelete 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: // ROW
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.row = iprot.readBinary();
              struct.setRowIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // COLUMNS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list44 = iprot.readListBegin();
                struct.columns = new ArrayList<TColumn>(_list44.size);
                for (int _i45 = 0; _i45 < _list44.size; ++_i45) {
                  TColumn _elem46; // required
                  _elem46 = new TColumn();
                  _elem46.read(iprot);
                  struct.columns.add(_elem46);
                }
                iprot.readListEnd();
              }
              struct.setColumnsIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // TIMESTAMP
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.timestamp = iprot.readI64();
              struct.setTimestampIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // DELETE_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.deleteType = TDeleteType.findByValue(iprot.readI32());
              struct.setDeleteTypeIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // WRITE_TO_WAL
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.writeToWal = iprot.readBool();
              struct.setWriteToWalIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map47 = iprot.readMapBegin();
                struct.attributes = new HashMap<ByteBuffer, ByteBuffer>(2 * _map47.size);
                for (int _i48 = 0; _i48 < _map47.size; ++_i48) {
                  ByteBuffer _key49; // required
                  ByteBuffer _val50; // optional
                  _key49 = iprot.readBinary();
                  _val50 = iprot.readBinary();
                  struct.attributes.put(_key49, _val50);
                }
                iprot.readMapEnd();
              }
              struct.setAttributesIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // DURABILITY
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.durability = TDurability.findByValue(iprot.readI32());
              struct.setDurabilityIsSet(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();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }
コード例 #12
0
ファイル: TIncrement.java プロジェクト: haoyuan/hbase
    public void read(org.apache.thrift.protocol.TProtocol iprot, TIncrement 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: // ROW
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.row = iprot.readBinary();
              struct.setRowIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // COLUMNS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list70 = iprot.readListBegin();
                struct.columns = new ArrayList<TColumnIncrement>(_list70.size);
                for (int _i71 = 0; _i71 < _list70.size; ++_i71) {
                  TColumnIncrement _elem72; // required
                  _elem72 = new TColumnIncrement();
                  _elem72.read(iprot);
                  struct.columns.add(_elem72);
                }
                iprot.readListEnd();
              }
              struct.setColumnsIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // ATTRIBUTES
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map73 = iprot.readMapBegin();
                struct.attributes = new HashMap<ByteBuffer, ByteBuffer>(2 * _map73.size);
                for (int _i74 = 0; _i74 < _map73.size; ++_i74) {
                  ByteBuffer _key75; // required
                  ByteBuffer _val76; // required
                  _key75 = iprot.readBinary();
                  _val76 = iprot.readBinary();
                  struct.attributes.put(_key75, _val76);
                }
                iprot.readMapEnd();
              }
              struct.setAttributesIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // DURABILITY
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.durability = TDurability.findByValue(iprot.readI32());
              struct.setDurabilityIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // CELL_VISIBILITY
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.cellVisibility = new TCellVisibility();
              struct.cellVisibility.read(iprot);
              struct.setCellVisibilityIsSet(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();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }
コード例 #13
0
    public void read(org.apache.thrift.protocol.TProtocol iprot, KsDef 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: // NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.name = iprot.readString();
              struct.setNameIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // STRATEGY_CLASS
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.strategy_class = iprot.readString();
              struct.setStrategy_classIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // STRATEGY_OPTIONS
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map74 = iprot.readMapBegin();
                struct.strategy_options = new HashMap<String, String>(2 * _map74.size);
                for (int _i75 = 0; _i75 < _map74.size; ++_i75) {
                  String _key76; // required
                  String _val77; // required
                  _key76 = iprot.readString();
                  _val77 = iprot.readString();
                  struct.strategy_options.put(_key76, _val77);
                }
                iprot.readMapEnd();
              }
              struct.setStrategy_optionsIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // REPLICATION_FACTOR
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.replication_factor = iprot.readI32();
              struct.setReplication_factorIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // CF_DEFS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list78 = iprot.readListBegin();
                struct.cf_defs = new ArrayList<CfDef>(_list78.size);
                for (int _i79 = 0; _i79 < _list78.size; ++_i79) {
                  CfDef _elem80; // required
                  _elem80 = new CfDef();
                  _elem80.read(iprot);
                  struct.cf_defs.add(_elem80);
                }
                iprot.readListEnd();
              }
              struct.setCf_defsIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // DURABLE_WRITES
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.durable_writes = iprot.readBool();
              struct.setDurable_writesIsSet(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();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }
コード例 #14
0
 public TMap readMapBegin() throws TException {
   return delegate.readMapBegin();
 }
コード例 #15
0
    public void read(org.apache.thrift.protocol.TProtocol iprot, DomainVersionMetadata 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: // PROPERTIES
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.properties = iprot.readBinary();
              struct.set_properties_isSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // PARTITIONS
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map8 = iprot.readMapBegin();
                struct.partitions = new HashMap<Integer, PartitionMetadata>(2 * _map8.size);
                for (int _i9 = 0; _i9 < _map8.size; ++_i9) {
                  int _key10; // required
                  PartitionMetadata _val11; // optional
                  _key10 = iprot.readI32();
                  _val11 = new PartitionMetadata();
                  _val11.read(iprot);
                  struct.partitions.put(_key10, _val11);
                }
                iprot.readMapEnd();
              }
              struct.set_partitions_isSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // DEFUNCT
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.defunct = iprot.readBool();
              struct.set_defunct_isSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // CLOSED_AT
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.closed_at = iprot.readI64();
              struct.set_closed_at_isSet(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();

      // check for required fields of primitive type, which can't be checked in the validate method
      if (!struct.is_set_defunct()) {
        throw new org.apache.thrift.protocol.TProtocolException(
            "Required field 'defunct' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.is_set_closed_at()) {
        throw new org.apache.thrift.protocol.TProtocolException(
            "Required field 'closed_at' was not found in serialized data! Struct: " + toString());
      }
      struct.validate();
    }
コード例 #16
0
    public void read(org.apache.thrift.protocol.TProtocol iprot, CrazyNesting 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: // STRING_FIELD
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.string_field = iprot.readString();
              struct.setString_fieldIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // SET_FIELD
            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
              {
                org.apache.thrift.protocol.TSet _set18 = iprot.readSetBegin();
                struct.set_field = new HashSet<Insanity>(2 * _set18.size);
                for (int _i19 = 0; _i19 < _set18.size; ++_i19) {
                  Insanity _elem20; // required
                  _elem20 = new Insanity();
                  _elem20.read(iprot);
                  struct.set_field.add(_elem20);
                }
                iprot.readSetEnd();
              }
              struct.setSet_fieldIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // LIST_FIELD
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list21 = iprot.readListBegin();
                struct.list_field =
                    new ArrayList<
                        Map<Set<Integer>, Map<Integer, Set<List<Map<Insanity, String>>>>>>(
                        _list21.size);
                for (int _i22 = 0; _i22 < _list21.size; ++_i22) {
                  Map<Set<Integer>, Map<Integer, Set<List<Map<Insanity, String>>>>>
                      _elem23; // required
                  {
                    org.apache.thrift.protocol.TMap _map24 = iprot.readMapBegin();
                    _elem23 =
                        new HashMap<Set<Integer>, Map<Integer, Set<List<Map<Insanity, String>>>>>(
                            2 * _map24.size);
                    for (int _i25 = 0; _i25 < _map24.size; ++_i25) {
                      Set<Integer> _key26; // required
                      Map<Integer, Set<List<Map<Insanity, String>>>> _val27; // required
                      {
                        org.apache.thrift.protocol.TSet _set28 = iprot.readSetBegin();
                        _key26 = new HashSet<Integer>(2 * _set28.size);
                        for (int _i29 = 0; _i29 < _set28.size; ++_i29) {
                          int _elem30; // required
                          _elem30 = iprot.readI32();
                          _key26.add(_elem30);
                        }
                        iprot.readSetEnd();
                      }
                      {
                        org.apache.thrift.protocol.TMap _map31 = iprot.readMapBegin();
                        _val27 =
                            new HashMap<Integer, Set<List<Map<Insanity, String>>>>(2 * _map31.size);
                        for (int _i32 = 0; _i32 < _map31.size; ++_i32) {
                          int _key33; // required
                          Set<List<Map<Insanity, String>>> _val34; // required
                          _key33 = iprot.readI32();
                          {
                            org.apache.thrift.protocol.TSet _set35 = iprot.readSetBegin();
                            _val34 = new HashSet<List<Map<Insanity, String>>>(2 * _set35.size);
                            for (int _i36 = 0; _i36 < _set35.size; ++_i36) {
                              List<Map<Insanity, String>> _elem37; // required
                              {
                                org.apache.thrift.protocol.TList _list38 = iprot.readListBegin();
                                _elem37 = new ArrayList<Map<Insanity, String>>(_list38.size);
                                for (int _i39 = 0; _i39 < _list38.size; ++_i39) {
                                  Map<Insanity, String> _elem40; // required
                                  {
                                    org.apache.thrift.protocol.TMap _map41 = iprot.readMapBegin();
                                    _elem40 = new HashMap<Insanity, String>(2 * _map41.size);
                                    for (int _i42 = 0; _i42 < _map41.size; ++_i42) {
                                      Insanity _key43; // required
                                      String _val44; // required
                                      _key43 = new Insanity();
                                      _key43.read(iprot);
                                      _val44 = iprot.readString();
                                      _elem40.put(_key43, _val44);
                                    }
                                    iprot.readMapEnd();
                                  }
                                  _elem37.add(_elem40);
                                }
                                iprot.readListEnd();
                              }
                              _val34.add(_elem37);
                            }
                            iprot.readSetEnd();
                          }
                          _val27.put(_key33, _val34);
                        }
                        iprot.readMapEnd();
                      }
                      _elem23.put(_key26, _val27);
                    }
                    iprot.readMapEnd();
                  }
                  struct.list_field.add(_elem23);
                }
                iprot.readListEnd();
              }
              struct.setList_fieldIsSet(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();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }
コード例 #17
0
ファイル: Table.java プロジェクト: sameeragarwal/hive_blinkdb
 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
   org.apache.thrift.protocol.TField field;
   iprot.readStructBegin();
   while (true) {
     field = iprot.readFieldBegin();
     if (field.type == org.apache.thrift.protocol.TType.STOP) {
       break;
     }
     switch (field.id) {
       case 1: // TABLE_NAME
         if (field.type == org.apache.thrift.protocol.TType.STRING) {
           this.tableName = iprot.readString();
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 2: // DB_NAME
         if (field.type == org.apache.thrift.protocol.TType.STRING) {
           this.dbName = iprot.readString();
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 3: // OWNER
         if (field.type == org.apache.thrift.protocol.TType.STRING) {
           this.owner = iprot.readString();
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 4: // CREATE_TIME
         if (field.type == org.apache.thrift.protocol.TType.I32) {
           this.createTime = iprot.readI32();
           setCreateTimeIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 5: // LAST_ACCESS_TIME
         if (field.type == org.apache.thrift.protocol.TType.I32) {
           this.lastAccessTime = iprot.readI32();
           setLastAccessTimeIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 6: // RETENTION
         if (field.type == org.apache.thrift.protocol.TType.I32) {
           this.retention = iprot.readI32();
           setRetentionIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 7: // SD
         if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
           this.sd = new StorageDescriptor();
           this.sd.read(iprot);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 8: // PARTITION_KEYS
         if (field.type == org.apache.thrift.protocol.TType.LIST) {
           {
             org.apache.thrift.protocol.TList _list66 = iprot.readListBegin();
             this.partitionKeys = new ArrayList<FieldSchema>(_list66.size);
             for (int _i67 = 0; _i67 < _list66.size; ++_i67) {
               FieldSchema _elem68; // required
               _elem68 = new FieldSchema();
               _elem68.read(iprot);
               this.partitionKeys.add(_elem68);
             }
             iprot.readListEnd();
           }
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 9: // PARAMETERS
         if (field.type == org.apache.thrift.protocol.TType.MAP) {
           {
             org.apache.thrift.protocol.TMap _map69 = iprot.readMapBegin();
             this.parameters = new HashMap<String, String>(2 * _map69.size);
             for (int _i70 = 0; _i70 < _map69.size; ++_i70) {
               String _key71; // required
               String _val72; // required
               _key71 = iprot.readString();
               _val72 = iprot.readString();
               this.parameters.put(_key71, _val72);
             }
             iprot.readMapEnd();
           }
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 10: // VIEW_ORIGINAL_TEXT
         if (field.type == org.apache.thrift.protocol.TType.STRING) {
           this.viewOriginalText = iprot.readString();
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 11: // VIEW_EXPANDED_TEXT
         if (field.type == org.apache.thrift.protocol.TType.STRING) {
           this.viewExpandedText = iprot.readString();
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 12: // TABLE_TYPE
         if (field.type == org.apache.thrift.protocol.TType.STRING) {
           this.tableType = iprot.readString();
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 13: // PRIVILEGES
         if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
           this.privileges = new PrincipalPrivilegeSet();
           this.privileges.read(iprot);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       default:
         org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
     }
     iprot.readFieldEnd();
   }
   iprot.readStructEnd();
   validate();
 }
コード例 #18
0
 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
   org.apache.thrift.protocol.TField field;
   iprot.readStructBegin();
   while (true) {
     field = iprot.readFieldBegin();
     if (field.type == org.apache.thrift.protocol.TType.STOP) {
       break;
     }
     switch (field.id) {
       case 1: // COLS
         if (field.type == org.apache.thrift.protocol.TType.LIST) {
           {
             org.apache.thrift.protocol.TList _list49 = iprot.readListBegin();
             this.cols = new ArrayList<FieldSchema>(_list49.size);
             for (int _i50 = 0; _i50 < _list49.size; ++_i50) {
               FieldSchema _elem51; // required
               _elem51 = new FieldSchema();
               _elem51.read(iprot);
               this.cols.add(_elem51);
             }
             iprot.readListEnd();
           }
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 2: // LOCATION
         if (field.type == org.apache.thrift.protocol.TType.STRING) {
           this.location = iprot.readString();
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 3: // INPUT_FORMAT
         if (field.type == org.apache.thrift.protocol.TType.STRING) {
           this.inputFormat = iprot.readString();
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 4: // OUTPUT_FORMAT
         if (field.type == org.apache.thrift.protocol.TType.STRING) {
           this.outputFormat = iprot.readString();
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 5: // COMPRESSED
         if (field.type == org.apache.thrift.protocol.TType.BOOL) {
           this.compressed = iprot.readBool();
           setCompressedIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 6: // NUM_BUCKETS
         if (field.type == org.apache.thrift.protocol.TType.I32) {
           this.numBuckets = iprot.readI32();
           setNumBucketsIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 7: // SERDE_INFO
         if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
           this.serdeInfo = new SerDeInfo();
           this.serdeInfo.read(iprot);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 8: // BUCKET_COLS
         if (field.type == org.apache.thrift.protocol.TType.LIST) {
           {
             org.apache.thrift.protocol.TList _list52 = iprot.readListBegin();
             this.bucketCols = new ArrayList<String>(_list52.size);
             for (int _i53 = 0; _i53 < _list52.size; ++_i53) {
               String _elem54; // required
               _elem54 = iprot.readString();
               this.bucketCols.add(_elem54);
             }
             iprot.readListEnd();
           }
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 9: // SORT_COLS
         if (field.type == org.apache.thrift.protocol.TType.LIST) {
           {
             org.apache.thrift.protocol.TList _list55 = iprot.readListBegin();
             this.sortCols = new ArrayList<Order>(_list55.size);
             for (int _i56 = 0; _i56 < _list55.size; ++_i56) {
               Order _elem57; // required
               _elem57 = new Order();
               _elem57.read(iprot);
               this.sortCols.add(_elem57);
             }
             iprot.readListEnd();
           }
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 10: // PARAMETERS
         if (field.type == org.apache.thrift.protocol.TType.MAP) {
           {
             org.apache.thrift.protocol.TMap _map58 = iprot.readMapBegin();
             this.parameters = new HashMap<String, String>(2 * _map58.size);
             for (int _i59 = 0; _i59 < _map58.size; ++_i59) {
               String _key60; // required
               String _val61; // required
               _key60 = iprot.readString();
               _val61 = iprot.readString();
               this.parameters.put(_key60, _val61);
             }
             iprot.readMapEnd();
           }
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
         break;
       default:
         org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
     }
     iprot.readFieldEnd();
   }
   iprot.readStructEnd();
   validate();
 }
コード例 #19
0
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      switch (field.id) {
        case TABLE:
          if (field.type == TType.STRING) {
            this.table = iprot.readString();
            this.__isset.table = true;
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case KEY:
          if (field.type == TType.STRING) {
            this.key = iprot.readString();
            this.__isset.key = true;
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case CFMAP:
          if (field.type == TType.MAP) {
            {
              TMap _map22 = iprot.readMapBegin();
              this.cfmap = new HashMap<String, List<superColumn_t>>(2 * _map22.size);
              for (int _i23 = 0; _i23 < _map22.size; ++_i23) {
                String _key24;
                List<superColumn_t> _val25;
                _key24 = iprot.readString();
                {
                  TList _list26 = iprot.readListBegin();
                  _val25 = new ArrayList<superColumn_t>(_list26.size);
                  for (int _i27 = 0; _i27 < _list26.size; ++_i27) {
                    superColumn_t _elem28;
                    _elem28 = new superColumn_t();
                    _elem28.read(iprot);
                    _val25.add(_elem28);
                  }
                  iprot.readListEnd();
                }
                this.cfmap.put(_key24, _val25);
              }
              iprot.readMapEnd();
            }
            this.__isset.cfmap = true;
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case CFMAPDEL:
          if (field.type == TType.MAP) {
            {
              TMap _map29 = iprot.readMapBegin();
              this.cfmapdel = new HashMap<String, List<superColumn_t>>(2 * _map29.size);
              for (int _i30 = 0; _i30 < _map29.size; ++_i30) {
                String _key31;
                List<superColumn_t> _val32;
                _key31 = iprot.readString();
                {
                  TList _list33 = iprot.readListBegin();
                  _val32 = new ArrayList<superColumn_t>(_list33.size);
                  for (int _i34 = 0; _i34 < _list33.size; ++_i34) {
                    superColumn_t _elem35;
                    _elem35 = new superColumn_t();
                    _elem35.read(iprot);
                    _val32.add(_elem35);
                  }
                  iprot.readListEnd();
                }
                this.cfmapdel.put(_key31, _val32);
              }
              iprot.readMapEnd();
            }
            this.__isset.cfmapdel = true;
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          TProtocolUtil.skip(iprot, field.type);
          break;
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }
コード例 #20
0
    public void read(org.apache.thrift.protocol.TProtocol iprot, TPermissionsUpdate 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: // HASFULL_IMAGE
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.hasfullImage = iprot.readBool();
              struct.setHasfullImageIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // SEQ_NUM
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.seqNum = iprot.readI64();
              struct.setSeqNumIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // PRIVILEGE_CHANGES
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map102 = iprot.readMapBegin();
                struct.privilegeChanges = new HashMap<String, TPrivilegeChanges>(2 * _map102.size);
                for (int _i103 = 0; _i103 < _map102.size; ++_i103) {
                  String _key104; // required
                  TPrivilegeChanges _val105; // required
                  _key104 = iprot.readString();
                  _val105 = new TPrivilegeChanges();
                  _val105.read(iprot);
                  struct.privilegeChanges.put(_key104, _val105);
                }
                iprot.readMapEnd();
              }
              struct.setPrivilegeChangesIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // ROLE_CHANGES
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map106 = iprot.readMapBegin();
                struct.roleChanges = new HashMap<String, TRoleChanges>(2 * _map106.size);
                for (int _i107 = 0; _i107 < _map106.size; ++_i107) {
                  String _key108; // required
                  TRoleChanges _val109; // required
                  _key108 = iprot.readString();
                  _val109 = new TRoleChanges();
                  _val109.read(iprot);
                  struct.roleChanges.put(_key108, _val109);
                }
                iprot.readMapEnd();
              }
              struct.setRoleChangesIsSet(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();

      // check for required fields of primitive type, which can't be checked in the validate method
      if (!struct.isSetHasfullImage()) {
        throw new org.apache.thrift.protocol.TProtocolException(
            "Required field 'hasfullImage' was not found in serialized data! Struct: "
                + toString());
      }
      if (!struct.isSetSeqNum()) {
        throw new org.apache.thrift.protocol.TProtocolException(
            "Required field 'seqNum' was not found in serialized data! Struct: " + toString());
      }
      struct.validate();
    }