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

HCM throws NullPointerException under load

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.98.0, 0.95.2, 0.94.11
    • Client
    • None
    • Reviewed

    Description

      HCM uses SoftValueSortedMap to cache region locations. Under load, some soft referred values may be GCed. So we should check if the value is null. Otherwise, NPE will be thrown:

              for (Map<byte[], HRegionLocation> tableLocations :
                  cachedRegionLocations.values()) {
                for (Entry<byte[], HRegionLocation> e : tableLocations.entrySet()) {
             ===> if (serverName.equals(e.getValue().getServerName())) {
                    tableLocations.remove(e.getKey());
                    deletedSomething = true;
                  }
                }
              }
      

      Attachments

        1. trunk-9048.patch
          0.9 kB
          Jimmy Xiang
        2. 0.94-9048.patch
          0.9 kB
          Jimmy Xiang

        Activity

          People

            jxiang Jimmy Xiang
            jxiang Jimmy Xiang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: