public void endScope(MetricsScope scope) {
    ((LegacyMetricsScope) scope).close();
  }
Closes scope if open, and reopens it
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/common/metrics/LegacyMetrics.java