i found the value of metric numReigons in Regions is not correct.
the metric can not add or remove region correctly as region close or open.
the metric as follow:
"name" : "Hadoop:service=HBase,name=RegionServer,sub=Regions",
"numRegions" : 2,
after trouble shooting ,i found the reason is in MetricsRegionSourceImpl#MetricsRegionSourceImpl
when add the MetricsRegionSource to set ,but the hashCode has not yet initialized.
So, the setFromMap can not put or remove the object correctly.
it will be better like this :