All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netease.arctic.ams.api.OptimizeTaskStat Maven / Gradle / Ivy

The newest version!
/**
 * Autogenerated by Thrift Compiler (0.13.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package com.netease.arctic.ams.api;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.13.0)", date = "2022-11-07")
public class OptimizeTaskStat implements com.netease.arctic.shade.org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
  private static final com.netease.arctic.shade.org.apache.thrift.protocol.TStruct STRUCT_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TStruct("OptimizeTaskStat");

  private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField JOB_ID_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("jobId", com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRUCT, (short)1);
  private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField TABLE_IDENTIFIER_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("tableIdentifier", com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRUCT, (short)2);
  private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField ATTEMPT_ID_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("attemptId", com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("taskId", com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRUCT, (short)4);
  private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("status", com.netease.arctic.shade.org.apache.thrift.protocol.TType.I32, (short)5);
  private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField FILES_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("files", com.netease.arctic.shade.org.apache.thrift.protocol.TType.LIST, (short)6);
  private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField ERROR_MESSAGE_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("errorMessage", com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRUCT, (short)7);
  private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField NEW_FILE_SIZE_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("newFileSize", com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64, (short)8);
  private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField REPORT_TIME_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("reportTime", com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64, (short)9);
  private static final com.netease.arctic.shade.org.apache.thrift.protocol.TField COST_TIME_FIELD_DESC = new com.netease.arctic.shade.org.apache.thrift.protocol.TField("costTime", com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64, (short)10);

  private static final com.netease.arctic.shade.org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new OptimizeTaskStatStandardSchemeFactory();
  private static final com.netease.arctic.shade.org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new OptimizeTaskStatTupleSchemeFactory();

  public @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable JobId jobId; // required
  public @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable com.netease.arctic.ams.api.TableIdentifier tableIdentifier; // required
  public @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.lang.String attemptId; // optional
  public @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable OptimizeTaskId taskId; // optional
  public @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable OptimizeStatus status; // optional
  public @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.util.List files; // optional
  public @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable ErrorMessage errorMessage; // optional
  public long newFileSize; // optional
  public long reportTime; // required
  public long costTime; // required

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements com.netease.arctic.shade.org.apache.thrift.TFieldIdEnum {
    JOB_ID((short)1, "jobId"),
    TABLE_IDENTIFIER((short)2, "tableIdentifier"),
    ATTEMPT_ID((short)3, "attemptId"),
    TASK_ID((short)4, "taskId"),
    STATUS((short)5, "status"),
    FILES((short)6, "files"),
    ERROR_MESSAGE((short)7, "errorMessage"),
    NEW_FILE_SIZE((short)8, "newFileSize"),
    REPORT_TIME((short)9, "reportTime"),
    COST_TIME((short)10, "costTime");

    private static final java.util.Map byName = new java.util.HashMap();

    static {
      for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // JOB_ID
          return JOB_ID;
        case 2: // TABLE_IDENTIFIER
          return TABLE_IDENTIFIER;
        case 3: // ATTEMPT_ID
          return ATTEMPT_ID;
        case 4: // TASK_ID
          return TASK_ID;
        case 5: // STATUS
          return STATUS;
        case 6: // FILES
          return FILES;
        case 7: // ERROR_MESSAGE
          return ERROR_MESSAGE;
        case 8: // NEW_FILE_SIZE
          return NEW_FILE_SIZE;
        case 9: // REPORT_TIME
          return REPORT_TIME;
        case 10: // COST_TIME
          return COST_TIME;
        default:
          return null;
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, throwing an exception
     * if it is not found.
     */
    public static _Fields findByThriftIdOrThrow(int fieldId) {
      _Fields fields = findByThriftId(fieldId);
      if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
    public static _Fields findByName(java.lang.String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final java.lang.String _fieldName;

    _Fields(short thriftId, java.lang.String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    public short getThriftFieldId() {
      return _thriftId;
    }

    public java.lang.String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int __NEWFILESIZE_ISSET_ID = 0;
  private static final int __REPORTTIME_ISSET_ID = 1;
  private static final int __COSTTIME_ISSET_ID = 2;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.ATTEMPT_ID,_Fields.TASK_ID,_Fields.STATUS,_Fields.FILES,_Fields.ERROR_MESSAGE,_Fields.NEW_FILE_SIZE};
  public static final java.util.Map<_Fields, com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    java.util.Map<_Fields, com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.JOB_ID, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("jobId", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldValueMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRUCT        , "JobId")));
    tmpMap.put(_Fields.TABLE_IDENTIFIER, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("tableIdentifier", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new com.netease.arctic.shade.org.apache.thrift.meta_data.StructMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRUCT, com.netease.arctic.ams.api.TableIdentifier.class)));
    tmpMap.put(_Fields.ATTEMPT_ID, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("attemptId", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldValueMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TASK_ID, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("taskId", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new com.netease.arctic.shade.org.apache.thrift.meta_data.StructMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRUCT, OptimizeTaskId.class)));
    tmpMap.put(_Fields.STATUS, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("status", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldValueMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.ENUM        , "OptimizeStatus")));
    tmpMap.put(_Fields.FILES, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("files", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new com.netease.arctic.shade.org.apache.thrift.meta_data.ListMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.LIST, 
            new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldValueMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRING            , true))));
    tmpMap.put(_Fields.ERROR_MESSAGE, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("errorMessage", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new com.netease.arctic.shade.org.apache.thrift.meta_data.StructMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRUCT, ErrorMessage.class)));
    tmpMap.put(_Fields.NEW_FILE_SIZE, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("newFileSize", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldValueMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.REPORT_TIME, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("reportTime", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldValueMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.COST_TIME, new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData("costTime", com.netease.arctic.shade.org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new com.netease.arctic.shade.org.apache.thrift.meta_data.FieldValueMetaData(com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    com.netease.arctic.shade.org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OptimizeTaskStat.class, metaDataMap);
  }

  public OptimizeTaskStat() {
  }

  public OptimizeTaskStat(
    JobId jobId,
    com.netease.arctic.ams.api.TableIdentifier tableIdentifier,
    long reportTime,
    long costTime)
  {
    this();
    this.jobId = jobId;
    this.tableIdentifier = tableIdentifier;
    this.reportTime = reportTime;
    setReportTimeIsSet(true);
    this.costTime = costTime;
    setCostTimeIsSet(true);
  }

  /**
   * Performs a deep copy on other.
   */
  public OptimizeTaskStat(OptimizeTaskStat other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetJobId()) {
      this.jobId = new JobId(other.jobId);
    }
    if (other.isSetTableIdentifier()) {
      this.tableIdentifier = new com.netease.arctic.ams.api.TableIdentifier(other.tableIdentifier);
    }
    if (other.isSetAttemptId()) {
      this.attemptId = other.attemptId;
    }
    if (other.isSetTaskId()) {
      this.taskId = new OptimizeTaskId(other.taskId);
    }
    if (other.isSetStatus()) {
      this.status = other.status;
    }
    if (other.isSetFiles()) {
      java.util.List __this__files = new java.util.ArrayList(other.files);
      this.files = __this__files;
    }
    if (other.isSetErrorMessage()) {
      this.errorMessage = new ErrorMessage(other.errorMessage);
    }
    this.newFileSize = other.newFileSize;
    this.reportTime = other.reportTime;
    this.costTime = other.costTime;
  }

  public OptimizeTaskStat deepCopy() {
    return new OptimizeTaskStat(this);
  }

  @Override
  public void clear() {
    this.jobId = null;
    this.tableIdentifier = null;
    this.attemptId = null;
    this.taskId = null;
    this.status = null;
    this.files = null;
    this.errorMessage = null;
    setNewFileSizeIsSet(false);
    this.newFileSize = 0;
    setReportTimeIsSet(false);
    this.reportTime = 0;
    setCostTimeIsSet(false);
    this.costTime = 0;
  }

  @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
  public JobId getJobId() {
    return this.jobId;
  }

  public OptimizeTaskStat setJobId(@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable JobId jobId) {
    this.jobId = jobId;
    return this;
  }

  public void unsetJobId() {
    this.jobId = null;
  }

  /** Returns true if field jobId is set (has been assigned a value) and false otherwise */
  public boolean isSetJobId() {
    return this.jobId != null;
  }

  public void setJobIdIsSet(boolean value) {
    if (!value) {
      this.jobId = null;
    }
  }

  @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
  public com.netease.arctic.ams.api.TableIdentifier getTableIdentifier() {
    return this.tableIdentifier;
  }

  public OptimizeTaskStat setTableIdentifier(@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable com.netease.arctic.ams.api.TableIdentifier tableIdentifier) {
    this.tableIdentifier = tableIdentifier;
    return this;
  }

  public void unsetTableIdentifier() {
    this.tableIdentifier = null;
  }

  /** Returns true if field tableIdentifier is set (has been assigned a value) and false otherwise */
  public boolean isSetTableIdentifier() {
    return this.tableIdentifier != null;
  }

  public void setTableIdentifierIsSet(boolean value) {
    if (!value) {
      this.tableIdentifier = null;
    }
  }

  @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
  public java.lang.String getAttemptId() {
    return this.attemptId;
  }

  public OptimizeTaskStat setAttemptId(@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.lang.String attemptId) {
    this.attemptId = attemptId;
    return this;
  }

  public void unsetAttemptId() {
    this.attemptId = null;
  }

  /** Returns true if field attemptId is set (has been assigned a value) and false otherwise */
  public boolean isSetAttemptId() {
    return this.attemptId != null;
  }

  public void setAttemptIdIsSet(boolean value) {
    if (!value) {
      this.attemptId = null;
    }
  }

  @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
  public OptimizeTaskId getTaskId() {
    return this.taskId;
  }

  public OptimizeTaskStat setTaskId(@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable OptimizeTaskId taskId) {
    this.taskId = taskId;
    return this;
  }

  public void unsetTaskId() {
    this.taskId = null;
  }

  /** Returns true if field taskId is set (has been assigned a value) and false otherwise */
  public boolean isSetTaskId() {
    return this.taskId != null;
  }

  public void setTaskIdIsSet(boolean value) {
    if (!value) {
      this.taskId = null;
    }
  }

  @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
  public OptimizeStatus getStatus() {
    return this.status;
  }

  public OptimizeTaskStat setStatus(@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable OptimizeStatus status) {
    this.status = status;
    return this;
  }

  public void unsetStatus() {
    this.status = null;
  }

  /** Returns true if field status is set (has been assigned a value) and false otherwise */
  public boolean isSetStatus() {
    return this.status != null;
  }

  public void setStatusIsSet(boolean value) {
    if (!value) {
      this.status = null;
    }
  }

  public int getFilesSize() {
    return (this.files == null) ? 0 : this.files.size();
  }

  @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
  public java.util.Iterator getFilesIterator() {
    return (this.files == null) ? null : this.files.iterator();
  }

  public void addToFiles(java.nio.ByteBuffer elem) {
    if (this.files == null) {
      this.files = new java.util.ArrayList();
    }
    this.files.add(elem);
  }

  @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
  public java.util.List getFiles() {
    return this.files;
  }

  public OptimizeTaskStat setFiles(@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.util.List files) {
    this.files = files;
    return this;
  }

  public void unsetFiles() {
    this.files = null;
  }

  /** Returns true if field files is set (has been assigned a value) and false otherwise */
  public boolean isSetFiles() {
    return this.files != null;
  }

  public void setFilesIsSet(boolean value) {
    if (!value) {
      this.files = null;
    }
  }

  @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
  public ErrorMessage getErrorMessage() {
    return this.errorMessage;
  }

  public OptimizeTaskStat setErrorMessage(@com.netease.arctic.shade.org.apache.thrift.annotation.Nullable ErrorMessage errorMessage) {
    this.errorMessage = errorMessage;
    return this;
  }

  public void unsetErrorMessage() {
    this.errorMessage = null;
  }

  /** Returns true if field errorMessage is set (has been assigned a value) and false otherwise */
  public boolean isSetErrorMessage() {
    return this.errorMessage != null;
  }

  public void setErrorMessageIsSet(boolean value) {
    if (!value) {
      this.errorMessage = null;
    }
  }

  public long getNewFileSize() {
    return this.newFileSize;
  }

  public OptimizeTaskStat setNewFileSize(long newFileSize) {
    this.newFileSize = newFileSize;
    setNewFileSizeIsSet(true);
    return this;
  }

  public void unsetNewFileSize() {
    __isset_bitfield = com.netease.arctic.shade.org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NEWFILESIZE_ISSET_ID);
  }

  /** Returns true if field newFileSize is set (has been assigned a value) and false otherwise */
  public boolean isSetNewFileSize() {
    return com.netease.arctic.shade.org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NEWFILESIZE_ISSET_ID);
  }

  public void setNewFileSizeIsSet(boolean value) {
    __isset_bitfield = com.netease.arctic.shade.org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NEWFILESIZE_ISSET_ID, value);
  }

  public long getReportTime() {
    return this.reportTime;
  }

  public OptimizeTaskStat setReportTime(long reportTime) {
    this.reportTime = reportTime;
    setReportTimeIsSet(true);
    return this;
  }

  public void unsetReportTime() {
    __isset_bitfield = com.netease.arctic.shade.org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REPORTTIME_ISSET_ID);
  }

  /** Returns true if field reportTime is set (has been assigned a value) and false otherwise */
  public boolean isSetReportTime() {
    return com.netease.arctic.shade.org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REPORTTIME_ISSET_ID);
  }

  public void setReportTimeIsSet(boolean value) {
    __isset_bitfield = com.netease.arctic.shade.org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REPORTTIME_ISSET_ID, value);
  }

  public long getCostTime() {
    return this.costTime;
  }

  public OptimizeTaskStat setCostTime(long costTime) {
    this.costTime = costTime;
    setCostTimeIsSet(true);
    return this;
  }

  public void unsetCostTime() {
    __isset_bitfield = com.netease.arctic.shade.org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COSTTIME_ISSET_ID);
  }

  /** Returns true if field costTime is set (has been assigned a value) and false otherwise */
  public boolean isSetCostTime() {
    return com.netease.arctic.shade.org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COSTTIME_ISSET_ID);
  }

  public void setCostTimeIsSet(boolean value) {
    __isset_bitfield = com.netease.arctic.shade.org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COSTTIME_ISSET_ID, value);
  }

  public void setFieldValue(_Fields field, @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case JOB_ID:
      if (value == null) {
        unsetJobId();
      } else {
        setJobId((JobId)value);
      }
      break;

    case TABLE_IDENTIFIER:
      if (value == null) {
        unsetTableIdentifier();
      } else {
        setTableIdentifier((com.netease.arctic.ams.api.TableIdentifier)value);
      }
      break;

    case ATTEMPT_ID:
      if (value == null) {
        unsetAttemptId();
      } else {
        setAttemptId((java.lang.String)value);
      }
      break;

    case TASK_ID:
      if (value == null) {
        unsetTaskId();
      } else {
        setTaskId((OptimizeTaskId)value);
      }
      break;

    case STATUS:
      if (value == null) {
        unsetStatus();
      } else {
        setStatus((OptimizeStatus)value);
      }
      break;

    case FILES:
      if (value == null) {
        unsetFiles();
      } else {
        setFiles((java.util.List)value);
      }
      break;

    case ERROR_MESSAGE:
      if (value == null) {
        unsetErrorMessage();
      } else {
        setErrorMessage((ErrorMessage)value);
      }
      break;

    case NEW_FILE_SIZE:
      if (value == null) {
        unsetNewFileSize();
      } else {
        setNewFileSize((java.lang.Long)value);
      }
      break;

    case REPORT_TIME:
      if (value == null) {
        unsetReportTime();
      } else {
        setReportTime((java.lang.Long)value);
      }
      break;

    case COST_TIME:
      if (value == null) {
        unsetCostTime();
      } else {
        setCostTime((java.lang.Long)value);
      }
      break;

    }
  }

  @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
  public java.lang.Object getFieldValue(_Fields field) {
    switch (field) {
    case JOB_ID:
      return getJobId();

    case TABLE_IDENTIFIER:
      return getTableIdentifier();

    case ATTEMPT_ID:
      return getAttemptId();

    case TASK_ID:
      return getTaskId();

    case STATUS:
      return getStatus();

    case FILES:
      return getFiles();

    case ERROR_MESSAGE:
      return getErrorMessage();

    case NEW_FILE_SIZE:
      return getNewFileSize();

    case REPORT_TIME:
      return getReportTime();

    case COST_TIME:
      return getCostTime();

    }
    throw new java.lang.IllegalStateException();
  }

  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  public boolean isSet(_Fields field) {
    if (field == null) {
      throw new java.lang.IllegalArgumentException();
    }

    switch (field) {
    case JOB_ID:
      return isSetJobId();
    case TABLE_IDENTIFIER:
      return isSetTableIdentifier();
    case ATTEMPT_ID:
      return isSetAttemptId();
    case TASK_ID:
      return isSetTaskId();
    case STATUS:
      return isSetStatus();
    case FILES:
      return isSetFiles();
    case ERROR_MESSAGE:
      return isSetErrorMessage();
    case NEW_FILE_SIZE:
      return isSetNewFileSize();
    case REPORT_TIME:
      return isSetReportTime();
    case COST_TIME:
      return isSetCostTime();
    }
    throw new java.lang.IllegalStateException();
  }

  @Override
  public boolean equals(java.lang.Object that) {
    if (that == null)
      return false;
    if (that instanceof OptimizeTaskStat)
      return this.equals((OptimizeTaskStat)that);
    return false;
  }

  public boolean equals(OptimizeTaskStat that) {
    if (that == null)
      return false;
    if (this == that)
      return true;

    boolean this_present_jobId = true && this.isSetJobId();
    boolean that_present_jobId = true && that.isSetJobId();
    if (this_present_jobId || that_present_jobId) {
      if (!(this_present_jobId && that_present_jobId))
        return false;
      if (!this.jobId.equals(that.jobId))
        return false;
    }

    boolean this_present_tableIdentifier = true && this.isSetTableIdentifier();
    boolean that_present_tableIdentifier = true && that.isSetTableIdentifier();
    if (this_present_tableIdentifier || that_present_tableIdentifier) {
      if (!(this_present_tableIdentifier && that_present_tableIdentifier))
        return false;
      if (!this.tableIdentifier.equals(that.tableIdentifier))
        return false;
    }

    boolean this_present_attemptId = true && this.isSetAttemptId();
    boolean that_present_attemptId = true && that.isSetAttemptId();
    if (this_present_attemptId || that_present_attemptId) {
      if (!(this_present_attemptId && that_present_attemptId))
        return false;
      if (!this.attemptId.equals(that.attemptId))
        return false;
    }

    boolean this_present_taskId = true && this.isSetTaskId();
    boolean that_present_taskId = true && that.isSetTaskId();
    if (this_present_taskId || that_present_taskId) {
      if (!(this_present_taskId && that_present_taskId))
        return false;
      if (!this.taskId.equals(that.taskId))
        return false;
    }

    boolean this_present_status = true && this.isSetStatus();
    boolean that_present_status = true && that.isSetStatus();
    if (this_present_status || that_present_status) {
      if (!(this_present_status && that_present_status))
        return false;
      if (!this.status.equals(that.status))
        return false;
    }

    boolean this_present_files = true && this.isSetFiles();
    boolean that_present_files = true && that.isSetFiles();
    if (this_present_files || that_present_files) {
      if (!(this_present_files && that_present_files))
        return false;
      if (!this.files.equals(that.files))
        return false;
    }

    boolean this_present_errorMessage = true && this.isSetErrorMessage();
    boolean that_present_errorMessage = true && that.isSetErrorMessage();
    if (this_present_errorMessage || that_present_errorMessage) {
      if (!(this_present_errorMessage && that_present_errorMessage))
        return false;
      if (!this.errorMessage.equals(that.errorMessage))
        return false;
    }

    boolean this_present_newFileSize = true && this.isSetNewFileSize();
    boolean that_present_newFileSize = true && that.isSetNewFileSize();
    if (this_present_newFileSize || that_present_newFileSize) {
      if (!(this_present_newFileSize && that_present_newFileSize))
        return false;
      if (this.newFileSize != that.newFileSize)
        return false;
    }

    boolean this_present_reportTime = true;
    boolean that_present_reportTime = true;
    if (this_present_reportTime || that_present_reportTime) {
      if (!(this_present_reportTime && that_present_reportTime))
        return false;
      if (this.reportTime != that.reportTime)
        return false;
    }

    boolean this_present_costTime = true;
    boolean that_present_costTime = true;
    if (this_present_costTime || that_present_costTime) {
      if (!(this_present_costTime && that_present_costTime))
        return false;
      if (this.costTime != that.costTime)
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    int hashCode = 1;

    hashCode = hashCode * 8191 + ((isSetJobId()) ? 131071 : 524287);
    if (isSetJobId())
      hashCode = hashCode * 8191 + jobId.hashCode();

    hashCode = hashCode * 8191 + ((isSetTableIdentifier()) ? 131071 : 524287);
    if (isSetTableIdentifier())
      hashCode = hashCode * 8191 + tableIdentifier.hashCode();

    hashCode = hashCode * 8191 + ((isSetAttemptId()) ? 131071 : 524287);
    if (isSetAttemptId())
      hashCode = hashCode * 8191 + attemptId.hashCode();

    hashCode = hashCode * 8191 + ((isSetTaskId()) ? 131071 : 524287);
    if (isSetTaskId())
      hashCode = hashCode * 8191 + taskId.hashCode();

    hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287);
    if (isSetStatus())
      hashCode = hashCode * 8191 + status.getValue();

    hashCode = hashCode * 8191 + ((isSetFiles()) ? 131071 : 524287);
    if (isSetFiles())
      hashCode = hashCode * 8191 + files.hashCode();

    hashCode = hashCode * 8191 + ((isSetErrorMessage()) ? 131071 : 524287);
    if (isSetErrorMessage())
      hashCode = hashCode * 8191 + errorMessage.hashCode();

    hashCode = hashCode * 8191 + ((isSetNewFileSize()) ? 131071 : 524287);
    if (isSetNewFileSize())
      hashCode = hashCode * 8191 + com.netease.arctic.shade.org.apache.thrift.TBaseHelper.hashCode(newFileSize);

    hashCode = hashCode * 8191 + com.netease.arctic.shade.org.apache.thrift.TBaseHelper.hashCode(reportTime);

    hashCode = hashCode * 8191 + com.netease.arctic.shade.org.apache.thrift.TBaseHelper.hashCode(costTime);

    return hashCode;
  }

  @Override
  public int compareTo(OptimizeTaskStat other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.valueOf(isSetJobId()).compareTo(other.isSetJobId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetJobId()) {
      lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.jobId, other.jobId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetTableIdentifier()).compareTo(other.isSetTableIdentifier());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTableIdentifier()) {
      lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.tableIdentifier, other.tableIdentifier);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetAttemptId()).compareTo(other.isSetAttemptId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAttemptId()) {
      lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.attemptId, other.attemptId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetTaskId()).compareTo(other.isSetTaskId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTaskId()) {
      lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStatus()) {
      lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.status, other.status);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetFiles()).compareTo(other.isSetFiles());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFiles()) {
      lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.files, other.files);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetErrorMessage()).compareTo(other.isSetErrorMessage());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetErrorMessage()) {
      lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.errorMessage, other.errorMessage);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetNewFileSize()).compareTo(other.isSetNewFileSize());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNewFileSize()) {
      lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.newFileSize, other.newFileSize);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetReportTime()).compareTo(other.isSetReportTime());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetReportTime()) {
      lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.reportTime, other.reportTime);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetCostTime()).compareTo(other.isSetCostTime());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCostTime()) {
      lastComparison = com.netease.arctic.shade.org.apache.thrift.TBaseHelper.compareTo(this.costTime, other.costTime);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable
  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(com.netease.arctic.shade.org.apache.thrift.protocol.TProtocol iprot) throws com.netease.arctic.shade.org.apache.thrift.TException {
    scheme(iprot).read(iprot, this);
  }

  public void write(com.netease.arctic.shade.org.apache.thrift.protocol.TProtocol oprot) throws com.netease.arctic.shade.org.apache.thrift.TException {
    scheme(oprot).write(oprot, this);
  }

  @Override
  public java.lang.String toString() {
    java.lang.StringBuilder sb = new java.lang.StringBuilder("OptimizeTaskStat(");
    boolean first = true;

    sb.append("jobId:");
    if (this.jobId == null) {
      sb.append("null");
    } else {
      sb.append(this.jobId);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("tableIdentifier:");
    if (this.tableIdentifier == null) {
      sb.append("null");
    } else {
      sb.append(this.tableIdentifier);
    }
    first = false;
    if (isSetAttemptId()) {
      if (!first) sb.append(", ");
      sb.append("attemptId:");
      if (this.attemptId == null) {
        sb.append("null");
      } else {
        sb.append(this.attemptId);
      }
      first = false;
    }
    if (isSetTaskId()) {
      if (!first) sb.append(", ");
      sb.append("taskId:");
      if (this.taskId == null) {
        sb.append("null");
      } else {
        sb.append(this.taskId);
      }
      first = false;
    }
    if (isSetStatus()) {
      if (!first) sb.append(", ");
      sb.append("status:");
      if (this.status == null) {
        sb.append("null");
      } else {
        sb.append(this.status);
      }
      first = false;
    }
    if (isSetFiles()) {
      if (!first) sb.append(", ");
      sb.append("files:");
      if (this.files == null) {
        sb.append("null");
      } else {
        com.netease.arctic.shade.org.apache.thrift.TBaseHelper.toString(this.files, sb);
      }
      first = false;
    }
    if (isSetErrorMessage()) {
      if (!first) sb.append(", ");
      sb.append("errorMessage:");
      if (this.errorMessage == null) {
        sb.append("null");
      } else {
        sb.append(this.errorMessage);
      }
      first = false;
    }
    if (isSetNewFileSize()) {
      if (!first) sb.append(", ");
      sb.append("newFileSize:");
      sb.append(this.newFileSize);
      first = false;
    }
    if (!first) sb.append(", ");
    sb.append("reportTime:");
    sb.append(this.reportTime);
    first = false;
    if (!first) sb.append(", ");
    sb.append("costTime:");
    sb.append(this.costTime);
    first = false;
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws com.netease.arctic.shade.org.apache.thrift.TException {
    // check for required fields
    // check for sub-struct validity
    if (tableIdentifier != null) {
      tableIdentifier.validate();
    }
    if (taskId != null) {
      taskId.validate();
    }
    if (errorMessage != null) {
      errorMessage.validate();
    }
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new com.netease.arctic.shade.org.apache.thrift.protocol.TCompactProtocol(new com.netease.arctic.shade.org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (com.netease.arctic.shade.org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
    try {
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
      __isset_bitfield = 0;
      read(new com.netease.arctic.shade.org.apache.thrift.protocol.TCompactProtocol(new com.netease.arctic.shade.org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (com.netease.arctic.shade.org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private static class OptimizeTaskStatStandardSchemeFactory implements com.netease.arctic.shade.org.apache.thrift.scheme.SchemeFactory {
    public OptimizeTaskStatStandardScheme getScheme() {
      return new OptimizeTaskStatStandardScheme();
    }
  }

  private static class OptimizeTaskStatStandardScheme extends com.netease.arctic.shade.org.apache.thrift.scheme.StandardScheme {

    public void read(com.netease.arctic.shade.org.apache.thrift.protocol.TProtocol iprot, OptimizeTaskStat struct) throws com.netease.arctic.shade.org.apache.thrift.TException {
      com.netease.arctic.shade.org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true)
      {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (schemeField.id) {
          case 1: // JOB_ID
            if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRUCT) {
              struct.jobId = new JobId();
              struct.jobId.read(iprot);
              struct.setJobIdIsSet(true);
            } else { 
              com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // TABLE_IDENTIFIER
            if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRUCT) {
              struct.tableIdentifier = new com.netease.arctic.ams.api.TableIdentifier();
              struct.tableIdentifier.read(iprot);
              struct.setTableIdentifierIsSet(true);
            } else { 
              com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // ATTEMPT_ID
            if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRING) {
              struct.attemptId = iprot.readString();
              struct.setAttemptIdIsSet(true);
            } else { 
              com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // TASK_ID
            if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRUCT) {
              struct.taskId = new OptimizeTaskId();
              struct.taskId.read(iprot);
              struct.setTaskIdIsSet(true);
            } else { 
              com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // STATUS
            if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.I32) {
              struct.status = com.netease.arctic.ams.api.OptimizeStatus.findByValue(iprot.readI32());
              struct.setStatusIsSet(true);
            } else { 
              com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // FILES
            if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.LIST) {
              {
                com.netease.arctic.shade.org.apache.thrift.protocol.TList _list50 = iprot.readListBegin();
                struct.files = new java.util.ArrayList(_list50.size);
                @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem51;
                for (int _i52 = 0; _i52 < _list50.size; ++_i52)
                {
                  _elem51 = iprot.readBinary();
                  struct.files.add(_elem51);
                }
                iprot.readListEnd();
              }
              struct.setFilesIsSet(true);
            } else { 
              com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // ERROR_MESSAGE
            if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRUCT) {
              struct.errorMessage = new ErrorMessage();
              struct.errorMessage.read(iprot);
              struct.setErrorMessageIsSet(true);
            } else { 
              com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // NEW_FILE_SIZE
            if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64) {
              struct.newFileSize = iprot.readI64();
              struct.setNewFileSizeIsSet(true);
            } else { 
              com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // REPORT_TIME
            if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64) {
              struct.reportTime = iprot.readI64();
              struct.setReportTimeIsSet(true);
            } else { 
              com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // COST_TIME
            if (schemeField.type == com.netease.arctic.shade.org.apache.thrift.protocol.TType.I64) {
              struct.costTime = iprot.readI64();
              struct.setCostTimeIsSet(true);
            } else { 
              com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            com.netease.arctic.shade.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }

    public void write(com.netease.arctic.shade.org.apache.thrift.protocol.TProtocol oprot, OptimizeTaskStat struct) throws com.netease.arctic.shade.org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.jobId != null) {
        oprot.writeFieldBegin(JOB_ID_FIELD_DESC);
        struct.jobId.write(oprot);
        oprot.writeFieldEnd();
      }
      if (struct.tableIdentifier != null) {
        oprot.writeFieldBegin(TABLE_IDENTIFIER_FIELD_DESC);
        struct.tableIdentifier.write(oprot);
        oprot.writeFieldEnd();
      }
      if (struct.attemptId != null) {
        if (struct.isSetAttemptId()) {
          oprot.writeFieldBegin(ATTEMPT_ID_FIELD_DESC);
          oprot.writeString(struct.attemptId);
          oprot.writeFieldEnd();
        }
      }
      if (struct.taskId != null) {
        if (struct.isSetTaskId()) {
          oprot.writeFieldBegin(TASK_ID_FIELD_DESC);
          struct.taskId.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.status != null) {
        if (struct.isSetStatus()) {
          oprot.writeFieldBegin(STATUS_FIELD_DESC);
          oprot.writeI32(struct.status.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.files != null) {
        if (struct.isSetFiles()) {
          oprot.writeFieldBegin(FILES_FIELD_DESC);
          {
            oprot.writeListBegin(new com.netease.arctic.shade.org.apache.thrift.protocol.TList(com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRING, struct.files.size()));
            for (java.nio.ByteBuffer _iter53 : struct.files)
            {
              oprot.writeBinary(_iter53);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.errorMessage != null) {
        if (struct.isSetErrorMessage()) {
          oprot.writeFieldBegin(ERROR_MESSAGE_FIELD_DESC);
          struct.errorMessage.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetNewFileSize()) {
        oprot.writeFieldBegin(NEW_FILE_SIZE_FIELD_DESC);
        oprot.writeI64(struct.newFileSize);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(REPORT_TIME_FIELD_DESC);
      oprot.writeI64(struct.reportTime);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(COST_TIME_FIELD_DESC);
      oprot.writeI64(struct.costTime);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class OptimizeTaskStatTupleSchemeFactory implements com.netease.arctic.shade.org.apache.thrift.scheme.SchemeFactory {
    public OptimizeTaskStatTupleScheme getScheme() {
      return new OptimizeTaskStatTupleScheme();
    }
  }

  private static class OptimizeTaskStatTupleScheme extends com.netease.arctic.shade.org.apache.thrift.scheme.TupleScheme {

    @Override
    public void write(com.netease.arctic.shade.org.apache.thrift.protocol.TProtocol prot, OptimizeTaskStat struct) throws com.netease.arctic.shade.org.apache.thrift.TException {
      com.netease.arctic.shade.org.apache.thrift.protocol.TTupleProtocol oprot = (com.netease.arctic.shade.org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetJobId()) {
        optionals.set(0);
      }
      if (struct.isSetTableIdentifier()) {
        optionals.set(1);
      }
      if (struct.isSetAttemptId()) {
        optionals.set(2);
      }
      if (struct.isSetTaskId()) {
        optionals.set(3);
      }
      if (struct.isSetStatus()) {
        optionals.set(4);
      }
      if (struct.isSetFiles()) {
        optionals.set(5);
      }
      if (struct.isSetErrorMessage()) {
        optionals.set(6);
      }
      if (struct.isSetNewFileSize()) {
        optionals.set(7);
      }
      if (struct.isSetReportTime()) {
        optionals.set(8);
      }
      if (struct.isSetCostTime()) {
        optionals.set(9);
      }
      oprot.writeBitSet(optionals, 10);
      if (struct.isSetJobId()) {
        struct.jobId.write(oprot);
      }
      if (struct.isSetTableIdentifier()) {
        struct.tableIdentifier.write(oprot);
      }
      if (struct.isSetAttemptId()) {
        oprot.writeString(struct.attemptId);
      }
      if (struct.isSetTaskId()) {
        struct.taskId.write(oprot);
      }
      if (struct.isSetStatus()) {
        oprot.writeI32(struct.status.getValue());
      }
      if (struct.isSetFiles()) {
        {
          oprot.writeI32(struct.files.size());
          for (java.nio.ByteBuffer _iter54 : struct.files)
          {
            oprot.writeBinary(_iter54);
          }
        }
      }
      if (struct.isSetErrorMessage()) {
        struct.errorMessage.write(oprot);
      }
      if (struct.isSetNewFileSize()) {
        oprot.writeI64(struct.newFileSize);
      }
      if (struct.isSetReportTime()) {
        oprot.writeI64(struct.reportTime);
      }
      if (struct.isSetCostTime()) {
        oprot.writeI64(struct.costTime);
      }
    }

    @Override
    public void read(com.netease.arctic.shade.org.apache.thrift.protocol.TProtocol prot, OptimizeTaskStat struct) throws com.netease.arctic.shade.org.apache.thrift.TException {
      com.netease.arctic.shade.org.apache.thrift.protocol.TTupleProtocol iprot = (com.netease.arctic.shade.org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(10);
      if (incoming.get(0)) {
        struct.jobId = new JobId();
        struct.jobId.read(iprot);
        struct.setJobIdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.tableIdentifier = new com.netease.arctic.ams.api.TableIdentifier();
        struct.tableIdentifier.read(iprot);
        struct.setTableIdentifierIsSet(true);
      }
      if (incoming.get(2)) {
        struct.attemptId = iprot.readString();
        struct.setAttemptIdIsSet(true);
      }
      if (incoming.get(3)) {
        struct.taskId = new OptimizeTaskId();
        struct.taskId.read(iprot);
        struct.setTaskIdIsSet(true);
      }
      if (incoming.get(4)) {
        struct.status = com.netease.arctic.ams.api.OptimizeStatus.findByValue(iprot.readI32());
        struct.setStatusIsSet(true);
      }
      if (incoming.get(5)) {
        {
          com.netease.arctic.shade.org.apache.thrift.protocol.TList _list55 = new com.netease.arctic.shade.org.apache.thrift.protocol.TList(com.netease.arctic.shade.org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.files = new java.util.ArrayList(_list55.size);
          @com.netease.arctic.shade.org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem56;
          for (int _i57 = 0; _i57 < _list55.size; ++_i57)
          {
            _elem56 = iprot.readBinary();
            struct.files.add(_elem56);
          }
        }
        struct.setFilesIsSet(true);
      }
      if (incoming.get(6)) {
        struct.errorMessage = new ErrorMessage();
        struct.errorMessage.read(iprot);
        struct.setErrorMessageIsSet(true);
      }
      if (incoming.get(7)) {
        struct.newFileSize = iprot.readI64();
        struct.setNewFileSizeIsSet(true);
      }
      if (incoming.get(8)) {
        struct.reportTime = iprot.readI64();
        struct.setReportTimeIsSet(true);
      }
      if (incoming.get(9)) {
        struct.costTime = iprot.readI64();
        struct.setCostTimeIsSet(true);
      }
    }
  }

  private static  S scheme(com.netease.arctic.shade.org.apache.thrift.protocol.TProtocol proto) {
    return (com.netease.arctic.shade.org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy