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 NoSuchObjectExceptionTupleScheme extends TupleScheme<NoSuchObjectException> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, NoSuchObjectException 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, NoSuchObjectException 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

  private static class MiniStructTupleScheme extends TupleScheme<MiniStruct> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, MiniStruct struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetMy_string()) {
        optionals.set(0);
      }
      if (struct.isSetMy_enum()) {
        optionals.set(1);
      }
      oprot.writeBitSet(optionals, 2);
      if (struct.isSetMy_string()) {
        oprot.writeString(struct.my_string);
      }
      if (struct.isSetMy_enum()) {
        oprot.writeI32(struct.my_enum.getValue());
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, MiniStruct 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.my_string = iprot.readString();
        struct.setMy_stringIsSet(true);
      }
      if (incoming.get(1)) {
        struct.my_enum = MyEnum.findByValue(iprot.readI32());
        struct.setMy_enumIsSet(true);
      }
    }
View Full Code Here

  private static class TableTupleScheme extends TupleScheme<Table> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, Table struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetTableName()) {
        optionals.set(0);
      }
      if (struct.isSetDbName()) {
        optionals.set(1);
      }
      if (struct.isSetOwner()) {
        optionals.set(2);
      }
      if (struct.isSetCreateTime()) {
        optionals.set(3);
      }
      if (struct.isSetLastAccessTime()) {
        optionals.set(4);
      }
      if (struct.isSetRetention()) {
        optionals.set(5);
      }
      if (struct.isSetSd()) {
        optionals.set(6);
      }
      if (struct.isSetPartitionKeys()) {
        optionals.set(7);
      }
      if (struct.isSetParameters()) {
        optionals.set(8);
      }
      if (struct.isSetViewOriginalText()) {
        optionals.set(9);
      }
      if (struct.isSetViewExpandedText()) {
        optionals.set(10);
      }
      if (struct.isSetTableType()) {
        optionals.set(11);
      }
      if (struct.isSetPrivileges()) {
        optionals.set(12);
      }
      oprot.writeBitSet(optionals, 13);
      if (struct.isSetTableName()) {
        oprot.writeString(struct.tableName);
      }
      if (struct.isSetDbName()) {
        oprot.writeString(struct.dbName);
      }
      if (struct.isSetOwner()) {
        oprot.writeString(struct.owner);
      }
      if (struct.isSetCreateTime()) {
        oprot.writeI32(struct.createTime);
      }
      if (struct.isSetLastAccessTime()) {
        oprot.writeI32(struct.lastAccessTime);
      }
      if (struct.isSetRetention()) {
        oprot.writeI32(struct.retention);
      }
      if (struct.isSetSd()) {
        struct.sd.write(oprot);
      }
      if (struct.isSetPartitionKeys()) {
        {
          oprot.writeI32(struct.partitionKeys.size());
          for (FieldSchema _iter199 : struct.partitionKeys)
          {
            _iter199.write(oprot);
          }
        }
      }
      if (struct.isSetParameters()) {
        {
          oprot.writeI32(struct.parameters.size());
          for (Map.Entry<String, String> _iter200 : struct.parameters.entrySet())
          {
            oprot.writeString(_iter200.getKey());
            oprot.writeString(_iter200.getValue());
          }
        }
      }
      if (struct.isSetViewOriginalText()) {
        oprot.writeString(struct.viewOriginalText);
      }
      if (struct.isSetViewExpandedText()) {
        oprot.writeString(struct.viewExpandedText);
      }
      if (struct.isSetTableType()) {
        oprot.writeString(struct.tableType);
      }
      if (struct.isSetPrivileges()) {
        struct.privileges.write(oprot);
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, Table struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(13);
      if (incoming.get(0)) {
        struct.tableName = iprot.readString();
        struct.setTableNameIsSet(true);
      }
      if (incoming.get(1)) {
        struct.dbName = iprot.readString();
        struct.setDbNameIsSet(true);
      }
      if (incoming.get(2)) {
        struct.owner = iprot.readString();
        struct.setOwnerIsSet(true);
      }
      if (incoming.get(3)) {
        struct.createTime = iprot.readI32();
        struct.setCreateTimeIsSet(true);
      }
      if (incoming.get(4)) {
        struct.lastAccessTime = iprot.readI32();
        struct.setLastAccessTimeIsSet(true);
      }
      if (incoming.get(5)) {
        struct.retention = iprot.readI32();
        struct.setRetentionIsSet(true);
      }
      if (incoming.get(6)) {
        struct.sd = new StorageDescriptor();
        struct.sd.read(iprot);
        struct.setSdIsSet(true);
      }
      if (incoming.get(7)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList _list201 = 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.partitionKeys = new ArrayList<FieldSchema>(_list201.size);
          for (int _i202 = 0; _i202 < _list201.size; ++_i202)
          {
            FieldSchema _elem203; // required
            _elem203 = new FieldSchema();
            _elem203.read(iprot);
            struct.partitionKeys.add(_elem203);
          }
        }
        struct.setPartitionKeysIsSet(true);
      }
      if (incoming.get(8)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap _map204 = 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*_map204.size);
          for (int _i205 = 0; _i205 < _map204.size; ++_i205)
          {
            String _key206; // required
            String _val207; // required
            _key206 = iprot.readString();
            _val207 = iprot.readString();
            struct.parameters.put(_key206, _val207);
          }
        }
        struct.setParametersIsSet(true);
      }
      if (incoming.get(9)) {
        struct.viewOriginalText = iprot.readString();
        struct.setViewOriginalTextIsSet(true);
      }
      if (incoming.get(10)) {
        struct.viewExpandedText = iprot.readString();
        struct.setViewExpandedTextIsSet(true);
      }
      if (incoming.get(11)) {
        struct.tableType = iprot.readString();
        struct.setTableTypeIsSet(true);
      }
      if (incoming.get(12)) {
        struct.privileges = new PrincipalPrivilegeSet();
        struct.privileges.read(iprot);
View Full Code Here

  private static class ComplexTupleScheme extends TupleScheme<Complex> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, Complex struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetAint()) {
        optionals.set(0);
      }
      if (struct.isSetAString()) {
        optionals.set(1);
      }
      if (struct.isSetLint()) {
        optionals.set(2);
      }
      if (struct.isSetLString()) {
        optionals.set(3);
      }
      if (struct.isSetLintString()) {
        optionals.set(4);
      }
      if (struct.isSetMStringString()) {
        optionals.set(5);
      }
      oprot.writeBitSet(optionals, 6);
      if (struct.isSetAint()) {
        oprot.writeI32(struct.aint);
      }
      if (struct.isSetAString()) {
        oprot.writeString(struct.aString);
      }
      if (struct.isSetLint()) {
        {
          oprot.writeI32(struct.lint.size());
          for (int _iter17 : struct.lint)
          {
            oprot.writeI32(_iter17);
          }
        }
      }
      if (struct.isSetLString()) {
        {
          oprot.writeI32(struct.lString.size());
          for (String _iter18 : struct.lString)
          {
            oprot.writeString(_iter18);
          }
        }
      }
      if (struct.isSetLintString()) {
        {
          oprot.writeI32(struct.lintString.size());
          for (IntString _iter19 : struct.lintString)
          {
            _iter19.write(oprot);
          }
        }
      }
      if (struct.isSetMStringString()) {
        {
          oprot.writeI32(struct.mStringString.size());
          for (Map.Entry<String, String> _iter20 : struct.mStringString.entrySet())
          {
            oprot.writeString(_iter20.getKey());
            oprot.writeString(_iter20.getValue());
          }
        }
      }
    }
View Full Code Here

  private static class RolePrincipalGrantTupleScheme extends TupleScheme<RolePrincipalGrant> {

    @Override
    public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, RolePrincipalGrant struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetRoleName()) {
        optionals.set(0);
      }
      if (struct.isSetPrincipalName()) {
        optionals.set(1);
      }
      if (struct.isSetPrincipalType()) {
        optionals.set(2);
      }
      if (struct.isSetGrantOption()) {
        optionals.set(3);
      }
      if (struct.isSetGrantTime()) {
        optionals.set(4);
      }
      if (struct.isSetGrantorName()) {
        optionals.set(5);
      }
      if (struct.isSetGrantorPrincipalType()) {
        optionals.set(6);
      }
      oprot.writeBitSet(optionals, 7);
      if (struct.isSetRoleName()) {
        oprot.writeString(struct.roleName);
      }
      if (struct.isSetPrincipalName()) {
        oprot.writeString(struct.principalName);
      }
      if (struct.isSetPrincipalType()) {
        oprot.writeI32(struct.principalType.getValue());
      }
      if (struct.isSetGrantOption()) {
        oprot.writeBool(struct.grantOption);
      }
      if (struct.isSetGrantTime()) {
        oprot.writeI32(struct.grantTime);
      }
      if (struct.isSetGrantorName()) {
        oprot.writeString(struct.grantorName);
      }
      if (struct.isSetGrantorPrincipalType()) {
        oprot.writeI32(struct.grantorPrincipalType.getValue());
      }
    }
View Full Code Here

      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, Complex struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(6);
      if (incoming.get(0)) {
        struct.aint = iprot.readI32();
        struct.setAintIsSet(true);
      }
      if (incoming.get(1)) {
        struct.aString = iprot.readString();
        struct.setAStringIsSet(true);
      }
      if (incoming.get(2)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList _list21 = new com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TType.I32, iprot.readI32());
          struct.lint = new ArrayList<Integer>(_list21.size);
          for (int _i22 = 0; _i22 < _list21.size; ++_i22)
          {
            int _elem23; // required
            _elem23 = iprot.readI32();
            struct.lint.add(_elem23);
          }
        }
        struct.setLintIsSet(true);
      }
      if (incoming.get(3)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList _list24 = 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.lString = new ArrayList<String>(_list24.size);
          for (int _i25 = 0; _i25 < _list24.size; ++_i25)
          {
            String _elem26; // required
            _elem26 = iprot.readString();
            struct.lString.add(_elem26);
          }
        }
        struct.setLStringIsSet(true);
      }
      if (incoming.get(4)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TList _list27 = 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.lintString = new ArrayList<IntString>(_list27.size);
          for (int _i28 = 0; _i28 < _list27.size; ++_i28)
          {
            IntString _elem29; // required
            _elem29 = new IntString();
            _elem29.read(iprot);
            struct.lintString.add(_elem29);
          }
        }
        struct.setLintStringIsSet(true);
      }
      if (incoming.get(5)) {
        {
          com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TMap _map30 = 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.mStringString = new HashMap<String,String>(2*_map30.size);
          for (int _i31 = 0; _i31 < _map30.size; ++_i31)
          {
            String _key32; // required
            String _val33; // required
            _key32 = iprot.readString();
            _val33 = iprot.readString();
            struct.mStringString.put(_key32, _val33);
          }
        }
        struct.setMStringStringIsSet(true);
      }
View Full Code Here

      }
    }

    @Override
    public void read(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, RolePrincipalGrant struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(7);
      if (incoming.get(0)) {
        struct.roleName = iprot.readString();
        struct.setRoleNameIsSet(true);
      }
      if (incoming.get(1)) {
        struct.principalName = iprot.readString();
        struct.setPrincipalNameIsSet(true);
      }
      if (incoming.get(2)) {
        struct.principalType = PrincipalType.findByValue(iprot.readI32());
        struct.setPrincipalTypeIsSet(true);
      }
      if (incoming.get(3)) {
        struct.grantOption = iprot.readBool();
        struct.setGrantOptionIsSet(true);
      }
      if (incoming.get(4)) {
        struct.grantTime = iprot.readI32();
        struct.setGrantTimeIsSet(true);
      }
      if (incoming.get(5)) {
        struct.grantorName = iprot.readString();
        struct.setGrantorNameIsSet(true);
      }
      if (incoming.get(6)) {
        struct.grantorPrincipalType = PrincipalType.findByValue(iprot.readI32());
        struct.setGrantorPrincipalTypeIsSet(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.