@Override
    public void write(org.apache.thrift.protocol.TProtocol prot, OpenTxnRequest struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      oprot.writeI32(struct.num_txns);
      oprot.writeString(struct.user);
      oprot.writeString(struct.hostname);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetAgentInfo()) {
        optionals.set(0);
      }
      if (struct.isSetReplPolicy()) {
        optionals.set(1);
      }
      if (struct.isSetReplSrcTxnIds()) {
        optionals.set(2);
      }
      if (struct.isSetTxn_type()) {
        optionals.set(3);
      }
      oprot.writeBitSet(optionals, 4);
      if (struct.isSetAgentInfo()) {
        oprot.writeString(struct.agentInfo);
      }
      if (struct.isSetReplPolicy()) {
        oprot.writeString(struct.replPolicy);
      }
      if (struct.isSetReplSrcTxnIds()) {
        {
          oprot.writeI32(struct.replSrcTxnIds.size());
          for (long _iter800 : struct.replSrcTxnIds)
          {
            oprot.writeI64(_iter800);
          }
        }
      }
      if (struct.isSetTxn_type()) {
        oprot.writeI32(struct.txn_type.getValue());
      }
    }
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java