Java Code Examples for org.apache.thrift.protocol.TTupleProtocol#readDouble()

The following examples show how to use org.apache.thrift.protocol.TTupleProtocol#readDouble() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MetricWindow.java    From jstorm with Apache License 2.0 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, MetricWindow struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  {
    org.apache.thrift.protocol.TMap _map112 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
    struct.metricWindow = new HashMap<Integer,Double>(2*_map112.size);
    int _key113;
    double _val114;
    for (int _i115 = 0; _i115 < _map112.size; ++_i115)
    {
      _key113 = iprot.readI32();
      _val114 = iprot.readDouble();
      struct.metricWindow.put(_key113, _val114);
    }
  }
  struct.set_metricWindow_isSet(true);
}
 
Example 2
Source File: Location.java    From octo-rpc with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Location struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.latitude = iprot.readDouble();
  struct.setLatitudeIsSet(true);
  struct.longitude = iprot.readDouble();
  struct.setLongitudeIsSet(true);
}
 
Example 3
Source File: Location.java    From octo-rpc with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Location struct) throws TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.latitude = iprot.readDouble();
  struct.setLatitudeIsSet(true);
  struct.longitude = iprot.readDouble();
  struct.setLongitudeIsSet(true);
}
 
Example 4
Source File: LoadInfo.java    From octo-rpc with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LoadInfo struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(5);
  if (incoming.get(0)) {
    struct.averageLoad = iprot.readDouble();
    struct.setAverageLoadIsSet(true);
  }
  if (incoming.get(1)) {
    struct.oldGC = iprot.readI32();
    struct.setOldGCIsSet(true);
  }
  if (incoming.get(2)) {
    struct.threadNum = iprot.readI32();
    struct.setThreadNumIsSet(true);
  }
  if (incoming.get(3)) {
    struct.queueSize = iprot.readI32();
    struct.setQueueSizeIsSet(true);
  }
  if (incoming.get(4)) {
    {
      org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
      struct.methodQpsMap = new HashMap<String,Double>(2*_map6.size);
      String _key7;
      double _val8;
      for (int _i9 = 0; _i9 < _map6.size; ++_i9)
      {
        _key7 = iprot.readString();
        _val8 = iprot.readDouble();
        struct.methodQpsMap.put(_key7, _val8);
      }
    }
    struct.setMethodQpsMapIsSet(true);
  }
}
 
Example 5
Source File: Word2VecModelThrift.java    From Word2VecJava with MIT License 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Word2VecModelThrift struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(3);
  if (incoming.get(0)) {
    {
      org.apache.thrift.protocol.TList _list10 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
      struct.vocab = new ArrayList<String>(_list10.size);
      for (int _i11 = 0; _i11 < _list10.size; ++_i11)
      {
        String _elem12;
        _elem12 = iprot.readString();
        struct.vocab.add(_elem12);
      }
    }
    struct.setVocabIsSet(true);
  }
  if (incoming.get(1)) {
    struct.layerSize = iprot.readI32();
    struct.setLayerSizeIsSet(true);
  }
  if (incoming.get(2)) {
    {
      org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
      struct.vectors = new ArrayList<Double>(_list13.size);
      for (int _i14 = 0; _i14 < _list13.size; ++_i14)
      {
        double _elem15;
        _elem15 = iprot.readDouble();
        struct.vectors.add(_elem15);
      }
    }
    struct.setVectorsIsSet(true);
  }
}
 
Example 6
Source File: JSONField.java    From gemfirexd-oss with Apache License 2.0 4 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, JSONField struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(8);
  if (incoming.get(0)) {
    struct.string_val = iprot.readString();
    struct.setString_valIsSet(true);
  }
  if (incoming.get(1)) {
    struct.bool_val = iprot.readBool();
    struct.setBool_valIsSet(true);
  }
  if (incoming.get(2)) {
    struct.i32_val = iprot.readI32();
    struct.setI32_valIsSet(true);
  }
  if (incoming.get(3)) {
    struct.i64_val = iprot.readI64();
    struct.setI64_valIsSet(true);
  }
  if (incoming.get(4)) {
    struct.double_val = iprot.readDouble();
    struct.setDouble_valIsSet(true);
  }
  if (incoming.get(5)) {
    struct.null_val = iprot.readBool();
    struct.setNull_valIsSet(true);
  }
  if (incoming.get(6)) {
    struct.ref_val = iprot.readI32();
    struct.setRef_valIsSet(true);
  }
  if (incoming.get(7)) {
    {
      org.apache.thrift.protocol.TList _list117 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
      struct.array_val = new ArrayList<Integer>(_list117.size);
      for (int _i118 = 0; _i118 < _list117.size; ++_i118)
      {
        int _elem119;
        _elem119 = iprot.readI32();
        struct.array_val.add(_elem119);
      }
    }
    struct.setArray_valIsSet(true);
  }
}
 
Example 7
Source File: ColumnValue.java    From gemfirexd-oss with Apache License 2.0 4 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ColumnValue struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(19);
  if (incoming.get(0)) {
    struct.bool_val = iprot.readBool();
    struct.setBool_valIsSet(true);
  }
  if (incoming.get(1)) {
    struct.byte_val = iprot.readByte();
    struct.setByte_valIsSet(true);
  }
  if (incoming.get(2)) {
    struct.i16_val = iprot.readI16();
    struct.setI16_valIsSet(true);
  }
  if (incoming.get(3)) {
    struct.i32_val = iprot.readI32();
    struct.setI32_valIsSet(true);
  }
  if (incoming.get(4)) {
    struct.i64_val = iprot.readI64();
    struct.setI64_valIsSet(true);
  }
  if (incoming.get(5)) {
    struct.float_val = iprot.readI32();
    struct.setFloat_valIsSet(true);
  }
  if (incoming.get(6)) {
    struct.double_val = iprot.readDouble();
    struct.setDouble_valIsSet(true);
  }
  if (incoming.get(7)) {
    struct.string_val = iprot.readString();
    struct.setString_valIsSet(true);
  }
  if (incoming.get(8)) {
    struct.decimal_val = new Decimal();
    struct.decimal_val.read(iprot);
    struct.setDecimal_valIsSet(true);
  }
  if (incoming.get(9)) {
    struct.date_val = new DateTime();
    struct.date_val.read(iprot);
    struct.setDate_valIsSet(true);
  }
  if (incoming.get(10)) {
    struct.time_val = new DateTime();
    struct.time_val.read(iprot);
    struct.setTime_valIsSet(true);
  }
  if (incoming.get(11)) {
    struct.timestamp_val = new Timestamp();
    struct.timestamp_val.read(iprot);
    struct.setTimestamp_valIsSet(true);
  }
  if (incoming.get(12)) {
    struct.binary_val = iprot.readBinary();
    struct.setBinary_valIsSet(true);
  }
  if (incoming.get(13)) {
    struct.blob_val = new BlobChunk();
    struct.blob_val.read(iprot);
    struct.setBlob_valIsSet(true);
  }
  if (incoming.get(14)) {
    struct.clob_val = new ClobChunk();
    struct.clob_val.read(iprot);
    struct.setClob_valIsSet(true);
  }
  if (incoming.get(15)) {
    struct.null_val = iprot.readBool();
    struct.setNull_valIsSet(true);
  }
  if (incoming.get(16)) {
    struct.pdx_val = new PDXObject();
    struct.pdx_val.read(iprot);
    struct.setPdx_valIsSet(true);
  }
  if (incoming.get(17)) {
    struct.json_val = new JSONObject();
    struct.json_val.read(iprot);
    struct.setJson_valIsSet(true);
  }
  if (incoming.get(18)) {
    struct.java_val = iprot.readBinary();
    struct.setJava_valIsSet(true);
  }
}
 
Example 8
Source File: JSONField.java    From gemfirexd-oss with Apache License 2.0 4 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, JSONField struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(8);
  if (incoming.get(0)) {
    struct.string_val = iprot.readString();
    struct.setString_valIsSet(true);
  }
  if (incoming.get(1)) {
    struct.bool_val = iprot.readBool();
    struct.setBool_valIsSet(true);
  }
  if (incoming.get(2)) {
    struct.i32_val = iprot.readI32();
    struct.setI32_valIsSet(true);
  }
  if (incoming.get(3)) {
    struct.i64_val = iprot.readI64();
    struct.setI64_valIsSet(true);
  }
  if (incoming.get(4)) {
    struct.double_val = iprot.readDouble();
    struct.setDouble_valIsSet(true);
  }
  if (incoming.get(5)) {
    struct.null_val = iprot.readBool();
    struct.setNull_valIsSet(true);
  }
  if (incoming.get(6)) {
    struct.ref_val = iprot.readI32();
    struct.setRef_valIsSet(true);
  }
  if (incoming.get(7)) {
    {
      org.apache.thrift.protocol.TList _list117 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
      struct.array_val = new ArrayList<Integer>(_list117.size);
      for (int _i118 = 0; _i118 < _list117.size; ++_i118)
      {
        int _elem119;
        _elem119 = iprot.readI32();
        struct.array_val.add(_elem119);
      }
    }
    struct.setArray_valIsSet(true);
  }
}
 
Example 9
Source File: ColumnValue.java    From gemfirexd-oss with Apache License 2.0 4 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ColumnValue struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(19);
  if (incoming.get(0)) {
    struct.bool_val = iprot.readBool();
    struct.setBool_valIsSet(true);
  }
  if (incoming.get(1)) {
    struct.byte_val = iprot.readByte();
    struct.setByte_valIsSet(true);
  }
  if (incoming.get(2)) {
    struct.i16_val = iprot.readI16();
    struct.setI16_valIsSet(true);
  }
  if (incoming.get(3)) {
    struct.i32_val = iprot.readI32();
    struct.setI32_valIsSet(true);
  }
  if (incoming.get(4)) {
    struct.i64_val = iprot.readI64();
    struct.setI64_valIsSet(true);
  }
  if (incoming.get(5)) {
    struct.float_val = iprot.readI32();
    struct.setFloat_valIsSet(true);
  }
  if (incoming.get(6)) {
    struct.double_val = iprot.readDouble();
    struct.setDouble_valIsSet(true);
  }
  if (incoming.get(7)) {
    struct.string_val = iprot.readString();
    struct.setString_valIsSet(true);
  }
  if (incoming.get(8)) {
    struct.decimal_val = new Decimal();
    struct.decimal_val.read(iprot);
    struct.setDecimal_valIsSet(true);
  }
  if (incoming.get(9)) {
    struct.date_val = new DateTime();
    struct.date_val.read(iprot);
    struct.setDate_valIsSet(true);
  }
  if (incoming.get(10)) {
    struct.time_val = new DateTime();
    struct.time_val.read(iprot);
    struct.setTime_valIsSet(true);
  }
  if (incoming.get(11)) {
    struct.timestamp_val = new Timestamp();
    struct.timestamp_val.read(iprot);
    struct.setTimestamp_valIsSet(true);
  }
  if (incoming.get(12)) {
    struct.binary_val = iprot.readBinary();
    struct.setBinary_valIsSet(true);
  }
  if (incoming.get(13)) {
    struct.blob_val = new BlobChunk();
    struct.blob_val.read(iprot);
    struct.setBlob_valIsSet(true);
  }
  if (incoming.get(14)) {
    struct.clob_val = new ClobChunk();
    struct.clob_val.read(iprot);
    struct.setClob_valIsSet(true);
  }
  if (incoming.get(15)) {
    struct.null_val = iprot.readBool();
    struct.setNull_valIsSet(true);
  }
  if (incoming.get(16)) {
    struct.pdx_val = new PDXObject();
    struct.pdx_val.read(iprot);
    struct.setPdx_valIsSet(true);
  }
  if (incoming.get(17)) {
    struct.json_val = new JSONObject();
    struct.json_val.read(iprot);
    struct.setJson_valIsSet(true);
  }
  if (incoming.get(18)) {
    struct.java_val = iprot.readBinary();
    struct.setJava_valIsSet(true);
  }
}
 
Example 10
Source File: MetricSnapshot.java    From jstorm with Apache License 2.0 4 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, MetricSnapshot struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.metricId = iprot.readI64();
  struct.set_metricId_isSet(true);
  struct.ts = iprot.readI64();
  struct.set_ts_isSet(true);
  struct.metricType = iprot.readI32();
  struct.set_metricType_isSet(true);
  BitSet incoming = iprot.readBitSet(17);
  if (incoming.get(0)) {
    struct.longValue = iprot.readI64();
    struct.set_longValue_isSet(true);
  }
  if (incoming.get(1)) {
    struct.doubleValue = iprot.readDouble();
    struct.set_doubleValue_isSet(true);
  }
  if (incoming.get(2)) {
    struct.m1 = iprot.readDouble();
    struct.set_m1_isSet(true);
  }
  if (incoming.get(3)) {
    struct.m5 = iprot.readDouble();
    struct.set_m5_isSet(true);
  }
  if (incoming.get(4)) {
    struct.m15 = iprot.readDouble();
    struct.set_m15_isSet(true);
  }
  if (incoming.get(5)) {
    struct.mean = iprot.readDouble();
    struct.set_mean_isSet(true);
  }
  if (incoming.get(6)) {
    struct.min = iprot.readI64();
    struct.set_min_isSet(true);
  }
  if (incoming.get(7)) {
    struct.max = iprot.readI64();
    struct.set_max_isSet(true);
  }
  if (incoming.get(8)) {
    struct.p50 = iprot.readDouble();
    struct.set_p50_isSet(true);
  }
  if (incoming.get(9)) {
    struct.p75 = iprot.readDouble();
    struct.set_p75_isSet(true);
  }
  if (incoming.get(10)) {
    struct.p95 = iprot.readDouble();
    struct.set_p95_isSet(true);
  }
  if (incoming.get(11)) {
    struct.p98 = iprot.readDouble();
    struct.set_p98_isSet(true);
  }
  if (incoming.get(12)) {
    struct.p99 = iprot.readDouble();
    struct.set_p99_isSet(true);
  }
  if (incoming.get(13)) {
    struct.p999 = iprot.readDouble();
    struct.set_p999_isSet(true);
  }
  if (incoming.get(14)) {
    struct.stddev = iprot.readDouble();
    struct.set_stddev_isSet(true);
  }
  if (incoming.get(15)) {
    struct.points = iprot.readBinary();
    struct.set_points_isSet(true);
  }
  if (incoming.get(16)) {
    struct.pointSize = iprot.readI32();
    struct.set_pointSize_isSet(true);
  }
}