Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-4263

Capacity scheduler 60%-40% formatting floating point issue

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 2.7.1
    • Fix Version/s: None
    • Component/s: client
    • Target Version/s:
    • Release Note:
      Hide
      Minor fix on queue capacity value formatting for the command
      'hadoop queue -list'
      Show
      Minor fix on queue capacity value formatting for the command 'hadoop queue -list'

      Description

      If capacity scheduler is set with two queues to 60% and 40% capacity, due to a java float floating representation issue

      > hadoop queue -list
      ======================
      Queue Name : default 
      Queue State : running 
      Scheduling Info : Capacity: 40.0, MaximumCapacity: 100.0, CurrentCapacity: 0.0 
      ======================
      Queue Name : large 
      Queue State : running 
      Scheduling Info : Capacity: 60.000004, MaximumCapacity: 100.0, CurrentCapacity: 0.0 
      

      Because

       System.err.println((0.6f) * 100); 

      results in 60.000004.

        Attachments

        1. YARN-4263.005.patch
          4 kB
          Adrian Kalaszi
        2. YARN-4263.004.patch
          4 kB
          Adrian Kalaszi
        3. YARN-4263.003.patch
          4 kB
          Adrian Kalaszi
        4. YARN-4263.002.patch
          5 kB
          Adrian Kalaszi
        5. YARN-4263.001.patch
          5 kB
          Adrian Kalaszi

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              akalaszi Adrian Kalaszi
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: