Example #1
0
 public override bool Equals(object other)
 {
     if (other is ContainerResourceIncrease)
     {
         ContainerResourceIncrease ctx = (ContainerResourceIncrease)other;
         if (GetContainerId() == null && ctx.GetContainerId() != null)
         {
             return false;
         }
         else
         {
             if (!GetContainerId().Equals(ctx.GetContainerId()))
             {
                 return false;
             }
         }
         if (GetCapability() == null && ctx.GetCapability() != null)
         {
             return false;
         }
         else
         {
             if (!GetCapability().Equals(ctx.GetCapability()))
             {
                 return false;
             }
         }
         return true;
     }
     else
     {
         return false;
     }
 }
Example #2
0
 public static ContainerResourceIncrease NewInstance(ContainerId existingContainerId
     , Resource targetCapability, Token token)
 {
     ContainerResourceIncrease context = Org.Apache.Hadoop.Yarn.Util.Records.NewRecord
         <ContainerResourceIncrease>();
     context.SetContainerId(existingContainerId);
     context.SetCapability(targetCapability);
     context.SetContainerToken(token);
     return context;
 }