public void startStoredScope(String name) {
    if (threadLocalScopes.get().containsKey(name)) {
      threadLocalScopes.get().get(name).open();
    } else {
      threadLocalScopes.get().put(name, new LegacyMetricsScope(name, this));
    }
  }
Closes scope if open, and reopens it
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/common/metrics/LegacyMetrics.java