Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-2834

getOwnerResourceSummaries not working properly because scheduler is wrapped as BlacklistScheduler

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: None

      Description

      https://github.com/apache/storm/blob/master/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java#L4101

       if (clusterSchedulerConfig.containsKey(theOwner)) {
                          if (scheduler instanceof ResourceAwareScheduler) {
                              Map<String, Object> schedulerConfig = (Map) clusterSchedulerConfig.get(theOwner);
                              if (schedulerConfig != null) {
                                  ownerResourceSummary.set_memory_guarantee((double)schedulerConfig.getOrDefault("memory", 0));
                                  ownerResourceSummary.set_cpu_guarantee((double)schedulerConfig.getOrDefault("cpu", 0));
                                  ownerResourceSummary.set_memory_guarantee_remaining(ownerResourceSummary.get_memory_guarantee()
                                          - ownerResourceSummary.get_memory_usage());
                                  ownerResourceSummary.set_cpu_guarantee_remaining(ownerResourceSummary.get_cpu_guarantee()
                                          - ownerResourceSummary.get_cpu_usage());
                              }
                          } else if (scheduler instanceof  MultitenantScheduler) {
                              ownerResourceSummary.set_isolated_node_guarantee((int) clusterSchedulerConfig.getOrDefault(theOwner, 0));
                          }
                      }
      

      Because scheduler is wrapped as BlackListScheduler (https://github.com/apache/storm/blob/master/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java#L474), these two "instanceof" will never be true.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ethanli Ethan Li
                Reporter:
                ethanli Ethan Li
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h