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 VersionTupleScheme extends TupleScheme<Version> {

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


      }
    }

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

  private static class OpenTxnRequestTupleScheme extends TupleScheme<OpenTxnRequest> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, OpenTxnRequest struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      oprot.writeI32(struct.num_txns);
      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, OpenTxnRequest struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      struct.num_txns = iprot.readI32();
      struct.setNum_txnsIsSet(true);
      struct.user = iprot.readString();
      struct.setUserIsSet(true);
      struct.hostname = iprot.readString();
      struct.setHostnameIsSet(true);
    }
View Full Code Here

  private static class LockResponseTupleScheme extends TupleScheme<LockResponse> {

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

      oprot.writeI32(struct.state.getValue());
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, LockResponse struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      struct.lockid = iprot.readI64();
      struct.setLockidIsSet(true);
      struct.state = LockState.findByValue(iprot.readI32());
      struct.setStateIsSet(true);
    }
View Full Code Here

  private static class ColumnStatisticsTupleScheme extends TupleScheme<ColumnStatistics> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, ColumnStatistics struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      struct.statsDesc.write(oprot);
      {
        oprot.writeI32(struct.statsObj.size());
        for (ColumnStatisticsObj _iter240 : struct.statsObj)
        {
          _iter240.write(oprot);
        }
      }
View Full Code Here

      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, ColumnStatistics struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      struct.statsDesc = new ColumnStatisticsDesc();
      struct.statsDesc.read(iprot);
      struct.setStatsDescIsSet(true);
      {
        com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList _list241 = 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.statsObj = new ArrayList<ColumnStatisticsObj>(_list241.size);
        for (int _i242 = 0; _i242 < _list241.size; ++_i242)
        {
          ColumnStatisticsObj _elem243; // required
          _elem243 = new ColumnStatisticsObj();
View Full Code Here

  private static class GetRoleGrantsForPrincipalRequestTupleScheme extends TupleScheme<GetRoleGrantsForPrincipalRequest> {

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

      oprot.writeI32(struct.principal_type.getValue());
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, GetRoleGrantsForPrincipalRequest struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      struct.principal_name = iprot.readString();
      struct.setPrincipal_nameIsSet(true);
      struct.principal_type = PrincipalType.findByValue(iprot.readI32());
      struct.setPrincipal_typeIsSet(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.