Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-10891 Über-jira: Test Improvement by adding missing test cases for existing code
  3. HDFS-11008

Change unit test for testing parsing "-source" parameter in Balancer CLI

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha2
    • test
    • None

    Description

      HDFS-8826 added an option -source to specify the source node list so that balancer only selects blocks to move from those nodes. This is very efficient in some cases. It also added a new test, testMinBlockSizeAndSourceNodes.

      However, testMinBlockSizeAndSourceNodes does not test -source option parsing, for both valid and invalid cases. It builds the parameters directly instead of parsing them from CLI. This JIRA is to track the effort of changing the test for that. In fact, we can refactor the existing code by replacing code that manually creates BalancerParameters with new code that explores the Balancer$Cli#parse().

      Thanks jingzhao for the initial proposal.

      Attachments

        1. HDFS-11008.000.patch
          5 kB
          Mingliang Liu

        Issue Links

          Activity

            People

              liuml07 Mingliang Liu
              liuml07 Mingliang Liu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: