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

Balancer should work with the logic of BlockPlacementPolicy

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.22.0
    • None
    • balancer & mover
    • None

    Description

      Currently Balancer does not obtain information from BlockPlacementPolicy so it can transfer the blocks without checking with BlockPlacementPolicy.
      This causes the policy break after balancing the cluster.

      There are some new policies proposed in HDFS-1094 and MAPREDUCE-1831 in which the block placement follows some pattern.
      The pattern can be broken by Balancer.

      I propose that we add the following method in BlockPlacementPolicy:

        abstract public boolean canBeMoved(String fileName, Block block,
          DatanodeInfo source, DatanodeInfo destination);
      

      And make Balancer use it in

        private boolean isGoodBlockCandidate(Source source,
            BalancerDatanode target, BalancerBlock block)
      

      What do you think?

      Attachments

        1. HDFS-1431.txt
          9 kB
          Scott Chen

        Issue Links

          Activity

            People

              schen Scott Chen
              schen Scott Chen
              Votes:
              0 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated: