Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-25826

Revisit the synchronization of balancer implementation

    XMLWordPrintableJSON

Details

    • Umbrella
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-alpha-1, 2.5.0
    • Balancer
    • None
    • Hide
      Narrow down the public facing API for LoadBalancer by removing balanceTable and setConf methods.
      Redesigned the initilization sequence to simplify the initialization code. Now all the setters are just 'setter', all the initialization work are moved to initialize method.
      Rename setClusterMetrics to updateClusterMetrics, as it will be called periodically while other setters will only be called once before initialization.
      Add javadoc for LoadBalancer class to mention how to do synchronization on implementation classes.
      Show
      Narrow down the public facing API for LoadBalancer by removing balanceTable and setConf methods. Redesigned the initilization sequence to simplify the initialization code. Now all the setters are just 'setter', all the initialization work are moved to initialize method. Rename setClusterMetrics to updateClusterMetrics, as it will be called periodically while other setters will only be called once before initialization. Add javadoc for LoadBalancer class to mention how to do synchronization on implementation classes.

    Description

      In StochasticLoadBalancer, some methods are synchronized, for example, setClusterMetrics, setConf, balanceTable, etc.

      What I can see is that, we have ConfigurationObserver support, so we need to make sure that the configuration updating does not effect the balance operation, so we need synchronization here. But do we support two balance operations at the same time? And what about other balancer implementations?

      I think we need to make the synchronization more clearer.

      Attachments

        Issue Links

          Activity

            People

              zhangduo Duo Zhang
              zhangduo Duo Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: