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

Avoid NPE when starting StochasticLoadBalancer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0.0
    • 1.4.0, 1.3.3, 2.0.0
    • Balancer
    • None
    • Reviewed

    Description

      When master start, it initialize StochasticLoadBalancer.

      this.balancer.setClusterStatus(getClusterStatus());
      this.balancer.setMasterServices(this);
      

      It first setClusterStatus(), then setMasterService(). But in setClusterStatus method, it use master service which is not initialized. So it will throw NPE.

      int tablesCount = isByTable ? services.getTableDescriptors().getAll().size() : 1;
      

      It happens when set isByTable is ture.

      Attachments

        1. HBASE-16910.patch
          4 kB
          Guanghao Zhang
        2. HBASE-16910-branch-1.patch
          2 kB
          Guanghao Zhang
        3. HBASE-16910-v1.patch
          3 kB
          Guanghao Zhang

        Activity

          People

            zghao Guanghao Zhang
            zghao Guanghao Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: