Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-5706

Should reset Balancer.Parameters.DEFALUT.policy in TestBalancer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 2.2.0
    • None
    • balancer & mover
    • None

    Description

      Now in TestBalancer.java, more than one test case will invoke the private method runBalancer, in which it will use Balancer.Parameters.Default, while the policy is never reset thus its totalUsedSpace and totalCapacity will increase continuously.

      We can reveal this issue by simply change

      TestBalancer#testBalancer1Internal
      testUnevenDistribution(conf,
              new long[] {50*CAPACITY/100, 10*CAPACITY/100},
              new long[]{CAPACITY, CAPACITY},
              new String[] {RACK0, RACK1});
      

      to

      TestBalancer#testBalancer1Internal
      testUnevenDistribution(conf,
              new long[] {70*CAPACITY/100, 40*CAPACITY/100},
              new long[]{CAPACITY, CAPACITY},
              new String[] {RACK0, RACK1});
      

      which in current implement, will cause none node under-replication thus cause the test case fail

      Attachments

        Issue Links

          Activity

            People

              liyu Yu Li
              liyu Yu Li
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: