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

Capacity scheduler 60%-40% formatting floating point issue

Add voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Trivial
    • Resolution: Unresolved
    • 2.7.1
    • None
    • client
    • 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.001.patch
          5 kB
          Adrian Kalaszi
        2. YARN-4263.002.patch
          5 kB
          Adrian Kalaszi
        3. YARN-4263.003.patch
          4 kB
          Adrian Kalaszi
        4. YARN-4263.004.patch
          4 kB
          Adrian Kalaszi
        5. YARN-4263.005.patch
          4 kB
          Adrian Kalaszi

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            akalaszi Adrian Kalaszi

            Dates

              Created:
              Updated:

              Slack

                Issue deployment