示例#1
0
 public static Org.Apache.Hadoop.Yarn.Api.Records.Resource Max(ResourceCalculator
                                                               resourceCalculator, Org.Apache.Hadoop.Yarn.Api.Records.Resource clusterResource,
                                                               Org.Apache.Hadoop.Yarn.Api.Records.Resource lhs, Org.Apache.Hadoop.Yarn.Api.Records.Resource
                                                               rhs)
 {
     return(resourceCalculator.Compare(clusterResource, lhs, rhs) >= 0 ? lhs : rhs);
 }
示例#2
0
 public static Org.Apache.Hadoop.Yarn.Api.Records.Resource Normalize(ResourceCalculator
                                                                     calculator, Org.Apache.Hadoop.Yarn.Api.Records.Resource lhs, Org.Apache.Hadoop.Yarn.Api.Records.Resource
                                                                     min, Org.Apache.Hadoop.Yarn.Api.Records.Resource max, Org.Apache.Hadoop.Yarn.Api.Records.Resource
                                                                     increment)
 {
     return(calculator.Normalize(lhs, min, max, increment));
 }
示例#3
0
 public TestResourceCalculator(ResourceCalculator rs)
 {
     this.resourceCalculator = rs;
 }
示例#4
0
 public static bool GreaterThanOrEqual(ResourceCalculator resourceCalculator, Org.Apache.Hadoop.Yarn.Api.Records.Resource
                                       clusterResource, Org.Apache.Hadoop.Yarn.Api.Records.Resource lhs, Org.Apache.Hadoop.Yarn.Api.Records.Resource
                                       rhs)
 {
     return(resourceCalculator.Compare(clusterResource, lhs, rhs) >= 0);
 }
示例#5
0
 public static bool LessThan(ResourceCalculator resourceCalculator, Org.Apache.Hadoop.Yarn.Api.Records.Resource
                             clusterResource, Org.Apache.Hadoop.Yarn.Api.Records.Resource lhs, Org.Apache.Hadoop.Yarn.Api.Records.Resource
                             rhs)
 {
     return(resourceCalculator.Compare(clusterResource, lhs, rhs) < 0);
 }
示例#6
0
 public static Org.Apache.Hadoop.Yarn.Api.Records.Resource DivideAndCeil(ResourceCalculator
                                                                         resourceCalculator, Org.Apache.Hadoop.Yarn.Api.Records.Resource lhs, int rhs)
 {
     return(resourceCalculator.DivideAndCeil(lhs, rhs));
 }
示例#7
0
 public static float Divide(ResourceCalculator resourceCalculator, Org.Apache.Hadoop.Yarn.Api.Records.Resource
                            clusterResource, Org.Apache.Hadoop.Yarn.Api.Records.Resource lhs, Org.Apache.Hadoop.Yarn.Api.Records.Resource
                            rhs)
 {
     return(resourceCalculator.Divide(clusterResource, lhs, rhs));
 }
示例#8
0
 public static float Ratio(ResourceCalculator resourceCalculator, Org.Apache.Hadoop.Yarn.Api.Records.Resource
                           lhs, Org.Apache.Hadoop.Yarn.Api.Records.Resource rhs)
 {
     return(resourceCalculator.Ratio(lhs, rhs));
 }
示例#9
0
 public static bool IsInvalidDivisor(ResourceCalculator resourceCalculator, Org.Apache.Hadoop.Yarn.Api.Records.Resource
                                     divisor)
 {
     return(resourceCalculator.IsInvalidDivisor(divisor));
 }
示例#10
0
 public static Org.Apache.Hadoop.Yarn.Api.Records.Resource RoundDown(ResourceCalculator
                                                                     calculator, Org.Apache.Hadoop.Yarn.Api.Records.Resource lhs, Org.Apache.Hadoop.Yarn.Api.Records.Resource
                                                                     factor)
 {
     return(calculator.RoundDown(lhs, factor));
 }
示例#11
0
 public static Org.Apache.Hadoop.Yarn.Api.Records.Resource MultiplyAndNormalizeDown
     (ResourceCalculator calculator, Org.Apache.Hadoop.Yarn.Api.Records.Resource lhs,
     double by, Org.Apache.Hadoop.Yarn.Api.Records.Resource factor)
 {
     return(calculator.MultiplyAndNormalizeDown(lhs, by, factor));
 }