Esempio n. 1
0
 /** Performs a deep copy on <i>other</i>. */
 public ThriftJobStatus(ThriftJobStatus other) {
   __isset_bit_vector.clear();
   __isset_bit_vector.or(other.__isset_bit_vector);
   if (other.isSetJobID()) {
     this.jobID = new ThriftJobID(other.jobID);
   }
   this.mapProgress = other.mapProgress;
   this.reduceProgress = other.reduceProgress;
   this.cleanupProgress = other.cleanupProgress;
   this.setupProgress = other.setupProgress;
   if (other.isSetRunState()) {
     this.runState = other.runState;
   }
   this.startTime = other.startTime;
   if (other.isSetUser()) {
     this.user = other.user;
   }
   if (other.isSetPriority()) {
     this.priority = other.priority;
   }
   if (other.isSetSchedulingInfo()) {
     this.schedulingInfo = other.schedulingInfo;
   }
 }
Esempio n. 2
0
  public int compareTo(ThriftJobStatus other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;
    ThriftJobStatus typedOther = (ThriftJobStatus) other;

    lastComparison = Boolean.valueOf(isSetJobID()).compareTo(typedOther.isSetJobID());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetJobID()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobID, typedOther.jobID);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMapProgress()).compareTo(typedOther.isSetMapProgress());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMapProgress()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.mapProgress, typedOther.mapProgress);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetReduceProgress()).compareTo(typedOther.isSetReduceProgress());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetReduceProgress()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.reduceProgress, typedOther.reduceProgress);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetCleanupProgress()).compareTo(typedOther.isSetCleanupProgress());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCleanupProgress()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.cleanupProgress, typedOther.cleanupProgress);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetSetupProgress()).compareTo(typedOther.isSetSetupProgress());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSetupProgress()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.setupProgress, typedOther.setupProgress);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRunState()).compareTo(typedOther.isSetRunState());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRunState()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runState, typedOther.runState);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetStartTime()).compareTo(typedOther.isSetStartTime());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStartTime()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.startTime, typedOther.startTime);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetUser()).compareTo(typedOther.isSetUser());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUser()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, typedOther.user);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPriority()).compareTo(typedOther.isSetPriority());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPriority()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.priority, typedOther.priority);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetSchedulingInfo()).compareTo(typedOther.isSetSchedulingInfo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSchedulingInfo()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.schedulingInfo, typedOther.schedulingInfo);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Esempio n. 3
0
  public boolean equals(ThriftJobStatus that) {
    if (that == null) return false;

    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_mapProgress = true;
    boolean that_present_mapProgress = true;
    if (this_present_mapProgress || that_present_mapProgress) {
      if (!(this_present_mapProgress && that_present_mapProgress)) return false;
      if (this.mapProgress != that.mapProgress) return false;
    }

    boolean this_present_reduceProgress = true;
    boolean that_present_reduceProgress = true;
    if (this_present_reduceProgress || that_present_reduceProgress) {
      if (!(this_present_reduceProgress && that_present_reduceProgress)) return false;
      if (this.reduceProgress != that.reduceProgress) return false;
    }

    boolean this_present_cleanupProgress = true;
    boolean that_present_cleanupProgress = true;
    if (this_present_cleanupProgress || that_present_cleanupProgress) {
      if (!(this_present_cleanupProgress && that_present_cleanupProgress)) return false;
      if (this.cleanupProgress != that.cleanupProgress) return false;
    }

    boolean this_present_setupProgress = true;
    boolean that_present_setupProgress = true;
    if (this_present_setupProgress || that_present_setupProgress) {
      if (!(this_present_setupProgress && that_present_setupProgress)) return false;
      if (this.setupProgress != that.setupProgress) return false;
    }

    boolean this_present_runState = true && this.isSetRunState();
    boolean that_present_runState = true && that.isSetRunState();
    if (this_present_runState || that_present_runState) {
      if (!(this_present_runState && that_present_runState)) return false;
      if (!this.runState.equals(that.runState)) return false;
    }

    boolean this_present_startTime = true;
    boolean that_present_startTime = true;
    if (this_present_startTime || that_present_startTime) {
      if (!(this_present_startTime && that_present_startTime)) return false;
      if (this.startTime != that.startTime) return false;
    }

    boolean this_present_user = true && this.isSetUser();
    boolean that_present_user = true && that.isSetUser();
    if (this_present_user || that_present_user) {
      if (!(this_present_user && that_present_user)) return false;
      if (!this.user.equals(that.user)) return false;
    }

    boolean this_present_priority = true && this.isSetPriority();
    boolean that_present_priority = true && that.isSetPriority();
    if (this_present_priority || that_present_priority) {
      if (!(this_present_priority && that_present_priority)) return false;
      if (!this.priority.equals(that.priority)) return false;
    }

    boolean this_present_schedulingInfo = true && this.isSetSchedulingInfo();
    boolean that_present_schedulingInfo = true && that.isSetSchedulingInfo();
    if (this_present_schedulingInfo || that_present_schedulingInfo) {
      if (!(this_present_schedulingInfo && that_present_schedulingInfo)) return false;
      if (!this.schedulingInfo.equals(that.schedulingInfo)) return false;
    }

    return true;
  }