Gour Saha created SLIDER-1160:
---------------------------------

             Summary: Incorrect expression in 
AbstractClientProvider.validateInstanceDefinition
                 Key: SLIDER-1160
                 URL: https://issues.apache.org/jira/browse/SLIDER-1160
             Project: Slider
          Issue Type: Bug
          Components: core
    Affects Versions: Slider 0.91
            Reporter: Gour Saha
            Priority: Minor


_*AbstractClientProvider.validateInstanceDefinition*_ has 2 calls to 
_*ProviderUtils.getRoleResourceRequirement*_ which are incorrect expressions. 
The _*getRoleResourceRequirement*_ method does not modify any internal state of 
objects and only makes sense to a caller if they capture the return value.

However in the below 2 calls the return value is ignored -
{code}
91        providerUtils.getRoleResourceRequirement(ram,
92                                                DEF_YARN_MEMORY,
93                                                 Integer.MAX_VALUE);
94        providerUtils.getRoleResourceRequirement(cores,
95                                                 DEF_YARN_CORES,
96                                                 Integer.MAX_VALUE);
{code}

Hence these lines of code should be removed or changes made appropriately to 
express the right intention.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to