Uploaded image for project: 'Slider'
  1. Slider
  2. SLIDER-1160

Incorrect expression in AbstractClientProvider.validateInstanceDefinition

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: Slider 0.91
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None

      Description

      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 -

      91        providerUtils.getRoleResourceRequirement(ram,
      92                                                DEF_YARN_MEMORY,
      93                                                 Integer.MAX_VALUE);
      94        providerUtils.getRoleResourceRequirement(cores,
      95                                                 DEF_YARN_CORES,
      96                                                 Integer.MAX_VALUE);
      

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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gsaha Gour Saha
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: