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

MetaTableMetrics#stop references uninitialized requestsMap for non-meta region

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      I noticed the following in test output:

      2018-07-21 15:54:43,181 ERROR [RS_CLOSE_REGION-regionserver/172.17.5.4:0-1] executor.EventHandler(186): Caught throwable while processing event M_RS_CLOSE_REGION
      java.lang.NullPointerException
        at org.apache.hadoop.hbase.coprocessor.MetaTableMetrics.stop(MetaTableMetrics.java:329)
        at org.apache.hadoop.hbase.coprocessor.BaseEnvironment.shutdown(BaseEnvironment.java:91)
        at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$RegionEnvironment.shutdown(RegionCoprocessorHost.java:165)
        at org.apache.hadoop.hbase.coprocessor.CoprocessorHost.shutdown(CoprocessorHost.java:290)
        at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$4.postEnvCall(RegionCoprocessorHost.java:559)
        at org.apache.hadoop.hbase.coprocessor.CoprocessorHost.execOperation(CoprocessorHost.java:622)
        at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.postClose(RegionCoprocessorHost.java:551)
        at org.apache.hadoop.hbase.regionserver.HRegion.doClose(HRegion.java:1678)
        at org.apache.hadoop.hbase.regionserver.HRegion.close(HRegion.java:1484)
        at org.apache.hadoop.hbase.regionserver.handler.CloseRegionHandler.process(CloseRegionHandler.java:104)
        at org.apache.hadoop.hbase.executor.EventHandler.run(EventHandler.java:104)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      

      requestsMap is only initialized for the meta region.
      However, check for meta region is absent in the stop method:

        public void stop(CoprocessorEnvironment e) throws IOException {
          // since meta region can move around, clear stale metrics when stop.
          for (String meterName : requestsMap.keySet()) {
      

      Attachments

        1. 20917.addendum
          0.9 kB
          Ted Yu
        2. 20917.v1.txt
          1 kB
          Ted Yu
        3. 20917.v2.txt
          2 kB
          Ted Yu

        Issue Links

          Activity

            People

              yuzhihong@gmail.com Ted Yu
              yuzhihong@gmail.com Ted Yu
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: