예제 #1
0
 public override bool Equals(object o)
 {
     if (!base.Equals(o))
     {
         return(false);
     }
     Org.Apache.Hadoop.Mapreduce.TaskID that = (Org.Apache.Hadoop.Mapreduce.TaskID)o;
     return(this.type == that.type && this.jobId.Equals(that.jobId));
 }
예제 #2
0
        /// <summary>Compare TaskInProgressIds by first jobIds, then by tip numbers.</summary>
        /// <remarks>
        /// Compare TaskInProgressIds by first jobIds, then by tip numbers. Reduces are
        /// defined as greater then maps.
        /// </remarks>
        public override int CompareTo(ID o)
        {
            Org.Apache.Hadoop.Mapreduce.TaskID that = (Org.Apache.Hadoop.Mapreduce.TaskID)o;
            int jobComp = this.jobId.CompareTo(that.jobId);

            if (jobComp == 0)
            {
                if (this.type == that.type)
                {
                    return(this.id - that.id);
                }
                else
                {
                    return(this.type.CompareTo(that.type));
                }
            }
            else
            {
                return(jobComp);
            }
        }