Package com.facebook.presto.hive.shaded.org.apache.thrift.protocol

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


  private static class IntStringTupleScheme extends TupleScheme<IntString> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, IntString struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetMyint()) {
        optionals.set(0);
      }
      if (struct.isSetMyString()) {
        optionals.set(1);
      }
      if (struct.isSetUnderscore_int()) {
        optionals.set(2);
      }
      oprot.writeBitSet(optionals, 3);
      if (struct.isSetMyint()) {
        oprot.writeI32(struct.myint);
      }
      if (struct.isSetMyString()) {
        oprot.writeString(struct.myString);
      }
      if (struct.isSetUnderscore_int()) {
        oprot.writeI32(struct.underscore_int);
      }
    }
View Full Code Here


      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, IntString struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(3);
      if (incoming.get(0)) {
        struct.myint = iprot.readI32();
        struct.setMyintIsSet(true);
      }
      if (incoming.get(1)) {
        struct.myString = iprot.readString();
        struct.setMyStringIsSet(true);
      }
      if (incoming.get(2)) {
        struct.underscore_int = iprot.readI32();
        struct.setUnderscore_intIsSet(true);
      }
    }
View Full Code Here

  private static class TxnInfoTupleScheme extends TupleScheme<TxnInfo> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, TxnInfo struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      oprot.writeI64(struct.id);
      oprot.writeI32(struct.state.getValue());
      oprot.writeString(struct.user);
      oprot.writeString(struct.hostname);
    }
View Full Code Here

      oprot.writeString(struct.hostname);
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, TxnInfo struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      struct.id = iprot.readI64();
      struct.setIdIsSet(true);
      struct.state = TxnState.findByValue(iprot.readI32());
      struct.setStateIsSet(true);
      struct.user = iprot.readString();
      struct.setUserIsSet(true);
      struct.hostname = iprot.readString();
      struct.setHostnameIsSet(true);
    }
View Full Code Here

  private static class StorageDescriptorTupleScheme extends TupleScheme<StorageDescriptor> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, StorageDescriptor struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetCols()) {
        optionals.set(0);
      }
      if (struct.isSetLocation()) {
        optionals.set(1);
      }
      if (struct.isSetInputFormat()) {
        optionals.set(2);
      }
      if (struct.isSetOutputFormat()) {
        optionals.set(3);
      }
      if (struct.isSetCompressed()) {
        optionals.set(4);
      }
      if (struct.isSetNumBuckets()) {
        optionals.set(5);
      }
      if (struct.isSetSerdeInfo()) {
        optionals.set(6);
      }
      if (struct.isSetBucketCols()) {
        optionals.set(7);
      }
      if (struct.isSetSortCols()) {
        optionals.set(8);
      }
      if (struct.isSetParameters()) {
        optionals.set(9);
      }
      if (struct.isSetSkewedInfo()) {
        optionals.set(10);
      }
      if (struct.isSetStoredAsSubDirectories()) {
        optionals.set(11);
      }
      oprot.writeBitSet(optionals, 12);
      if (struct.isSetCols()) {
        {
          oprot.writeI32(struct.cols.size());
          for (FieldSchema _iter173 : struct.cols)
          {
            _iter173.write(oprot);
          }
        }
      }
      if (struct.isSetLocation()) {
        oprot.writeString(struct.location);
      }
      if (struct.isSetInputFormat()) {
        oprot.writeString(struct.inputFormat);
      }
      if (struct.isSetOutputFormat()) {
        oprot.writeString(struct.outputFormat);
      }
      if (struct.isSetCompressed()) {
        oprot.writeBool(struct.compressed);
      }
      if (struct.isSetNumBuckets()) {
        oprot.writeI32(struct.numBuckets);
      }
      if (struct.isSetSerdeInfo()) {
        struct.serdeInfo.write(oprot);
      }
      if (struct.isSetBucketCols()) {
        {
          oprot.writeI32(struct.bucketCols.size());
          for (String _iter174 : struct.bucketCols)
          {
            oprot.writeString(_iter174);
          }
        }
      }
      if (struct.isSetSortCols()) {
        {
          oprot.writeI32(struct.sortCols.size());
          for (Order _iter175 : struct.sortCols)
          {
            _iter175.write(oprot);
          }
        }
      }
      if (struct.isSetParameters()) {
        {
          oprot.writeI32(struct.parameters.size());
          for (Map.Entry<String, String> _iter176 : struct.parameters.entrySet())
          {
            oprot.writeString(_iter176.getKey());
            oprot.writeString(_iter176.getValue());
          }
        }
      }
      if (struct.isSetSkewedInfo()) {
        struct.skewedInfo.write(oprot);
      }
      if (struct.isSetStoredAsSubDirectories()) {
        oprot.writeBool(struct.storedAsSubDirectories);
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, StorageDescriptor struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(12);
      if (incoming.get(0)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList _list177 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
          struct.cols = new ArrayList<FieldSchema>(_list177.size);
          for (int _i178 = 0; _i178 < _list177.size; ++_i178)
          {
            FieldSchema _elem179; // required
            _elem179 = new FieldSchema();
            _elem179.read(iprot);
            struct.cols.add(_elem179);
          }
        }
        struct.setColsIsSet(true);
      }
      if (incoming.get(1)) {
        struct.location = iprot.readString();
        struct.setLocationIsSet(true);
      }
      if (incoming.get(2)) {
        struct.inputFormat = iprot.readString();
        struct.setInputFormatIsSet(true);
      }
      if (incoming.get(3)) {
        struct.outputFormat = iprot.readString();
        struct.setOutputFormatIsSet(true);
      }
      if (incoming.get(4)) {
        struct.compressed = iprot.readBool();
        struct.setCompressedIsSet(true);
      }
      if (incoming.get(5)) {
        struct.numBuckets = iprot.readI32();
        struct.setNumBucketsIsSet(true);
      }
      if (incoming.get(6)) {
        struct.serdeInfo = new SerDeInfo();
        struct.serdeInfo.read(iprot);
        struct.setSerdeInfoIsSet(true);
      }
      if (incoming.get(7)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList _list180 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.bucketCols = new ArrayList<String>(_list180.size);
          for (int _i181 = 0; _i181 < _list180.size; ++_i181)
          {
            String _elem182; // required
            _elem182 = iprot.readString();
            struct.bucketCols.add(_elem182);
          }
        }
        struct.setBucketColsIsSet(true);
      }
      if (incoming.get(8)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList _list183 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
          struct.sortCols = new ArrayList<Order>(_list183.size);
          for (int _i184 = 0; _i184 < _list183.size; ++_i184)
          {
            Order _elem185; // required
            _elem185 = new Order();
            _elem185.read(iprot);
            struct.sortCols.add(_elem185);
          }
        }
        struct.setSortColsIsSet(true);
      }
      if (incoming.get(9)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap _map186 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRING, com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.parameters = new HashMap<String,String>(2*_map186.size);
          for (int _i187 = 0; _i187 < _map186.size; ++_i187)
          {
            String _key188; // required
            String _val189; // required
            _key188 = iprot.readString();
            _val189 = iprot.readString();
            struct.parameters.put(_key188, _val189);
          }
        }
        struct.setParametersIsSet(true);
      }
      if (incoming.get(10)) {
        struct.skewedInfo = new SkewedInfo();
        struct.skewedInfo.read(iprot);
        struct.setSkewedInfoIsSet(true);
      }
      if (incoming.get(11)) {
        struct.storedAsSubDirectories = iprot.readBool();
        struct.setStoredAsSubDirectoriesIsSet(true);
      }
    }
View Full Code Here

  private static class HeartbeatTxnRangeResponseTupleScheme extends TupleScheme<HeartbeatTxnRangeResponse> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, HeartbeatTxnRangeResponse struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      {
        oprot.writeI32(struct.aborted.size());
        for (long _iter426 : struct.aborted)
        {
          oprot.writeI64(_iter426);
        }
      }
      {
        oprot.writeI32(struct.nosuch.size());
        for (long _iter427 : struct.nosuch)
        {
          oprot.writeI64(_iter427);
        }
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, HeartbeatTxnRangeResponse struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      {
        com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TSet _set428 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TSet(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.I64, iprot.readI32());
        struct.aborted = new HashSet<Long>(2*_set428.size);
        for (int _i429 = 0; _i429 < _set428.size; ++_i429)
        {
          long _elem430; // required
          _elem430 = iprot.readI64();
          struct.aborted.add(_elem430);
        }
      }
      struct.setAbortedIsSet(true);
      {
        com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TSet _set431 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TSet(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.I64, iprot.readI32());
        struct.nosuch = new HashSet<Long>(2*_set431.size);
        for (int _i432 = 0; _i432 < _set431.size; ++_i432)
        {
          long _elem433; // required
          _elem433 = iprot.readI64();
          struct.nosuch.add(_elem433);
        }
      }
      struct.setNosuchIsSet(true);
    }
View Full Code Here

  private static class UnknownPartitionExceptionTupleScheme extends TupleScheme<UnknownPartitionException> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, UnknownPartitionException struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetMessage()) {
        optionals.set(0);
      }
      oprot.writeBitSet(optionals, 1);
      if (struct.isSetMessage()) {
        oprot.writeString(struct.message);
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, UnknownPartitionException struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(1);
      if (incoming.get(0)) {
        struct.message = iprot.readString();
        struct.setMessageIsSet(true);
      }
    }
View Full Code Here

TOP

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

Copyright © 2018 www.massapicom. 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.