Examples of TTupleProtocol


Examples of com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TTupleProtocol

  private static class ThriftTestObjTupleScheme extends TupleScheme<ThriftTestObj> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, ThriftTestObj struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetField1()) {
        optionals.set(0);
      }
      if (struct.isSetField2()) {
        optionals.set(1);
      }
      if (struct.isSetField3()) {
        optionals.set(2);
      }
      oprot.writeBitSet(optionals, 3);
      if (struct.isSetField1()) {
        oprot.writeI32(struct.field1);
      }
      if (struct.isSetField2()) {
        oprot.writeString(struct.field2);
      }
      if (struct.isSetField3()) {
        {
          oprot.writeI32(struct.field3.size());
          for (InnerStruct _iter4 : struct.field3)
          {
            _iter4.write(oprot);
          }
        }
View Full Code Here

Examples of org.apache.blur.thirdparty.thrift_0_9_0.protocol.TTupleProtocol

  private static class MetricTupleScheme extends TupleScheme<Metric> {

    @Override
    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Metric struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetName()) {
        optionals.set(0);
      }
      if (struct.isSetStrMap()) {
        optionals.set(1);
      }
      if (struct.isSetLongMap()) {
        optionals.set(2);
      }
      if (struct.isSetDoubleMap()) {
        optionals.set(3);
      }
      oprot.writeBitSet(optionals, 4);
      if (struct.isSetName()) {
        oprot.writeString(struct.name);
      }
      if (struct.isSetStrMap()) {
        {
          oprot.writeI32(struct.strMap.size());
          for (Map.Entry<String, String> _iter183 : struct.strMap.entrySet())
          {
            oprot.writeString(_iter183.getKey());
            oprot.writeString(_iter183.getValue());
          }
        }
      }
      if (struct.isSetLongMap()) {
        {
          oprot.writeI32(struct.longMap.size());
          for (Map.Entry<String, Long> _iter184 : struct.longMap.entrySet())
          {
            oprot.writeString(_iter184.getKey());
            oprot.writeI64(_iter184.getValue());
          }
        }
      }
      if (struct.isSetDoubleMap()) {
        {
          oprot.writeI32(struct.doubleMap.size());
          for (Map.Entry<String, Double> _iter185 : struct.doubleMap.entrySet())
          {
            oprot.writeString(_iter185.getKey());
            oprot.writeDouble(_iter185.getValue());
          }
        }
      }
    }
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol

    private static class storeTopKeyValueAnnotations_resultTupleScheme extends TupleScheme<storeTopKeyValueAnnotations_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, storeTopKeyValueAnnotations_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetE()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetE()) {
          struct.e.write(oprot);
        }
      }
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol

        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, storeTopKeyValueAnnotations_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.e = new StoreAggregatesException();
          struct.e.read(iprot);
          struct.setEIsSet(true);
        }
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol

  private static class BinaryAnnotationTupleScheme extends TupleScheme<BinaryAnnotation> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, BinaryAnnotation struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetKey()) {
        optionals.set(0);
      }
      if (struct.isSetValue()) {
        optionals.set(1);
      }
      if (struct.isSetAnnotation_type()) {
        optionals.set(2);
      }
      if (struct.isSetHost()) {
        optionals.set(3);
      }
      oprot.writeBitSet(optionals, 4);
      if (struct.isSetKey()) {
        oprot.writeString(struct.key);
      }
      if (struct.isSetValue()) {
        oprot.writeBinary(struct.value);
      }
      if (struct.isSetAnnotation_type()) {
        oprot.writeI32(struct.annotation_type.getValue());
      }
      if (struct.isSetHost()) {
        struct.host.write(oprot);
      }
    }
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol

      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, BinaryAnnotation struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(4);
      if (incoming.get(0)) {
        struct.key = iprot.readString();
        struct.setKeyIsSet(true);
      }
      if (incoming.get(1)) {
        struct.value = iprot.readBinary();
        struct.setValueIsSet(true);
      }
      if (incoming.get(2)) {
        struct.annotation_type = AnnotationType.findByValue(iprot.readI32());
        struct.setAnnotation_typeIsSet(true);
      }
      if (incoming.get(3)) {
        struct.host = new Endpoint();
        struct.host.read(iprot);
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol

    private static class storeDependencies_argsTupleScheme extends TupleScheme<storeDependencies_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, storeDependencies_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetService_name()) {
          optionals.set(0);
        }
        if (struct.isSetEndpoints()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetService_name()) {
          oprot.writeString(struct.service_name);
        }
        if (struct.isSetEndpoints()) {
          {
            oprot.writeI32(struct.endpoints.size());
            for (String _iter20 : struct.endpoints)
            {
              oprot.writeString(_iter20);
            }
          }
        }
      }
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol

        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, storeDependencies_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.service_name = iprot.readString();
          struct.setService_nameIsSet(true);
        }
        if (incoming.get(1)) {
          {
            org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.endpoints = new ArrayList<String>(_list21.size);
            for (int _i22 = 0; _i22 < _list21.size; ++_i22)
            {
              String _elem23; // required
              _elem23 = iprot.readString();
              struct.endpoints.add(_elem23);
            }
          }
          struct.setEndpointsIsSet(true);
        }
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol

  private static class AnnotationTupleScheme extends TupleScheme<Annotation> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, Annotation struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetTimestamp()) {
        optionals.set(0);
      }
      if (struct.isSetValue()) {
        optionals.set(1);
      }
      if (struct.isSetHost()) {
        optionals.set(2);
      }
      if (struct.isSetDuration()) {
        optionals.set(3);
      }
      oprot.writeBitSet(optionals, 4);
      if (struct.isSetTimestamp()) {
        oprot.writeI64(struct.timestamp);
      }
      if (struct.isSetValue()) {
        oprot.writeString(struct.value);
      }
      if (struct.isSetHost()) {
        struct.host.write(oprot);
      }
      if (struct.isSetDuration()) {
        oprot.writeI32(struct.duration);
      }
    }
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol

      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, Annotation struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(4);
      if (incoming.get(0)) {
        struct.timestamp = iprot.readI64();
        struct.setTimestampIsSet(true);
      }
      if (incoming.get(1)) {
        struct.value = iprot.readString();
        struct.setValueIsSet(true);
      }
      if (incoming.get(2)) {
        struct.host = new Endpoint();
        struct.host.read(iprot);
        struct.setHostIsSet(true);
      }
      if (incoming.get(3)) {
        struct.duration = iprot.readI32();
        struct.setDurationIsSet(true);
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.