public void write(org.apache.thrift.protocol.TProtocol oprot, TxnInfo struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ID_FIELD_DESC);
      oprot.writeI64(struct.id);
      oprot.writeFieldEnd();
      if (struct.state != null) {
        oprot.writeFieldBegin(STATE_FIELD_DESC);
        oprot.writeI32(struct.state.getValue());
        oprot.writeFieldEnd();
      }
      if (struct.user != null) {
        oprot.writeFieldBegin(USER_FIELD_DESC);
        oprot.writeString(struct.user);
        oprot.writeFieldEnd();
      }
      if (struct.hostname != null) {
        oprot.writeFieldBegin(HOSTNAME_FIELD_DESC);
        oprot.writeString(struct.hostname);
        oprot.writeFieldEnd();
      }
      if (struct.agentInfo != null) {
        if (struct.isSetAgentInfo()) {
          oprot.writeFieldBegin(AGENT_INFO_FIELD_DESC);
          oprot.writeString(struct.agentInfo);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetHeartbeatCount()) {
        oprot.writeFieldBegin(HEARTBEAT_COUNT_FIELD_DESC);
        oprot.writeI32(struct.heartbeatCount);
        oprot.writeFieldEnd();
      }
      if (struct.metaInfo != null) {
        if (struct.isSetMetaInfo()) {
          oprot.writeFieldBegin(META_INFO_FIELD_DESC);
          oprot.writeString(struct.metaInfo);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetStartedTime()) {
        oprot.writeFieldBegin(STARTED_TIME_FIELD_DESC);
        oprot.writeI64(struct.startedTime);
        oprot.writeFieldEnd();
      }
      if (struct.isSetLastHeartbeatTime()) {
        oprot.writeFieldBegin(LAST_HEARTBEAT_TIME_FIELD_DESC);
        oprot.writeI64(struct.lastHeartbeatTime);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
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