/**Compare TaskInProgressIds by first jobIds, then by tip numbers. Reduces are * defined as greater then maps.*/ @Override public int compareTo(ID o) { TaskID that = (TaskID)o; int jobComp = this.jobId.compareTo(that.jobId); if(jobComp == 0) { if(this.isMap == that.isMap) { return this.id - that.id; } else return this.isMap ? -1 : 1; } else return jobComp; }
/**Compare TaskInProgressIds by first jobIds, then by tip numbers. Reduces are * defined as greater then maps.*/ @Override public int compareTo(org.apache.hadoop.mapreduce.ID o) { JVMId that = (JVMId)o; int jobComp = this.jobId.compareTo(that.jobId); if(jobComp == 0) { if(this.isMap == that.isMap) { return this.id - that.id; } else { return this.isMap ? -1 : 1; } } else { return jobComp; } }
/**Compare TaskInProgressIds by first jobIds, then by tip numbers. Reduces are * defined as greater then maps.*/ @Override public int compareTo(ID o) { JVMId that = (JVMId)o; int jobComp = this.jobId.compareTo(that.jobId); if(jobComp == 0) { if(this.isMap == that.isMap) { return this.id - that.id; } else return this.isMap ? -1 : 1; } else return jobComp; }
/**Compare TaskInProgressIds by first jobIds, then by tip numbers. Reduces are * defined as greater then maps.*/ @Override public int compareTo(org.apache.hadoop.mapreduce.ID o) { JVMId that = (JVMId)o; int jobComp = this.jobId.compareTo(that.jobId); if(jobComp == 0) { if(this.isMap == that.isMap) { return this.id - that.id; } else { return this.isMap ? -1 : 1; } } else { return jobComp; } }
/** * Compare TaskInProgressIds by first jobIds, then by tip numbers. Reduces are * defined as greater then maps. **/ public int compareTo(JVMId that) { int jobComp = this.jobId.compareTo(that.jobId); if(jobComp == 0) { if(this.isMap == that.isMap) { return Long.valueOf(this.jvmId).compareTo(that.jvmId); } else { return this.isMap ? -1 : 1; } } else { return jobComp; } }
/** * Compare TaskInProgressIds by first jobIds, then by tip numbers. Reduces are * defined as greater then maps. **/ public int compareTo(JVMId that) { int jobComp = this.jobId.compareTo(that.jobId); if(jobComp == 0) { if(this.isMap == that.isMap) { return Long.valueOf(this.jvmId).compareTo(that.jvmId); } else { return this.isMap ? -1 : 1; } } else { return jobComp; } }
/** * Compare TaskInProgressIds by first jobIds, then by tip numbers. Reduces are * defined as greater then maps. **/ public int compareTo(JVMId that) { int jobComp = this.jobId.compareTo(that.jobId); if(jobComp == 0) { if(this.isMap == that.isMap) { return Long.valueOf(this.jvmId).compareTo(that.jvmId); } else { return this.isMap ? -1 : 1; } } else { return jobComp; } }
/** * Compare TaskInProgressIds by first jobIds, then by tip numbers. Reduces are * defined as greater then maps. **/ public int compareTo(JVMId that) { int jobComp = this.jobId.compareTo(that.jobId); if(jobComp == 0) { if(this.isMap == that.isMap) { return Long.valueOf(this.jvmId).compareTo(that.jvmId); } else { return this.isMap ? -1 : 1; } } else { return jobComp; } }
public int compare(JobSchedulingInfo o1, JobSchedulingInfo o2) { int res = o1.getPriority().compareTo(o2.getPriority()); if (res == 0) { if (o1.getStartTime() < o2.getStartTime()) { res = -1; } else { res = (o1.getStartTime() == o2.getStartTime() ? 0 : 1); } } if (res == 0) { res = o1.getJobID().compareTo(o2.getJobID()); } return res; } };
public int compare(JobSchedulingInfo o1, JobSchedulingInfo o2) { int res = o1.getPriority().compareTo(o2.getPriority()); if (res == 0) { if (o1.getStartTime() < o2.getStartTime()) { res = -1; } else { res = (o1.getStartTime() == o2.getStartTime() ? 0 : 1); } } if (res == 0) { res = o1.getJobID().compareTo(o2.getJobID()); } return res; } };
public int compare(JobSchedulingInfo o1, JobSchedulingInfo o2) { int res = o1.getPriority().compareTo(o2.getPriority()); if (res == 0) { if (o1.getStartTime() < o2.getStartTime()) { res = -1; } else { res = (o1.getStartTime() == o2.getStartTime() ? 0 : 1); } } if (res == 0) { res = o1.getJobID().compareTo(o2.getJobID()); } return res; } };