@Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TxnInfo struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      oprot.writeI64(struct.id);
      oprot.writeI32(struct.state.getValue());
      oprot.writeString(struct.user);
      oprot.writeString(struct.hostname);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetAgentInfo()) {
        optionals.set(0);
      }
      if (struct.isSetHeartbeatCount()) {
        optionals.set(1);
      }
      if (struct.isSetMetaInfo()) {
        optionals.set(2);
      }
      if (struct.isSetStartedTime()) {
        optionals.set(3);
      }
      if (struct.isSetLastHeartbeatTime()) {
        optionals.set(4);
      }
      oprot.writeBitSet(optionals, 5);
      if (struct.isSetAgentInfo()) {
        oprot.writeString(struct.agentInfo);
      }
      if (struct.isSetHeartbeatCount()) {
        oprot.writeI32(struct.heartbeatCount);
      }
      if (struct.isSetMetaInfo()) {
        oprot.writeString(struct.metaInfo);
      }
      if (struct.isSetStartedTime()) {
        oprot.writeI64(struct.startedTime);
      }
      if (struct.isSetLastHeartbeatTime()) {
        oprot.writeI64(struct.lastHeartbeatTime);
      }
    }
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/TxnInfo.java