public float getMaxCapacity ( String queue ) { float result = rmConf . getFloat ( toFullPropertyName ( queue , MAX_CAPACITY_PROPERTY ) , - 1 ) ; //if result is 0 or less than 0 set it to -1 result = ( result <= 0 ) ? - 1 : result ; if ( result > 100.0 ) { throw new IllegalArgumentException ( "Illegal " + MAX_CAPACITY_PROPERTY + " for queue " + queue + " of " + result ) ; } if ( ( result != - 1 ) && ( result < getCapacity ( queue ) ) ) { throw new IllegalArgumentException ( MAX_CAPACITY_PROPERTY + " " + result + " for a queue should be greater than or equal to capacity " ) ; } return result ; }
Return the maximum percentage of the cluster capacity that can be used by the given queue . This percentage defines a limit beyond which a queue cannot use the capacity of cluster . This provides a means to limit how much excess capacity a queue can use . By default there is no limit .