예제 #1
0
 @Override
 public int compareTo(TaskAttemptId other) {
   int taskIdComp = this.getTaskId().compareTo(other.getTaskId());
   if (taskIdComp == 0) {
     return this.getId() - other.getId();
   } else {
     return taskIdComp;
   }
 }
예제 #2
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   TaskAttemptId other = (TaskAttemptId) obj;
   if (getId() != other.getId()) return false;
   if (!getTaskId().equals(other.getTaskId())) return false;
   return true;
 }