public static List<MetricsSource> getAllMetricsSources() {
    ArrayList<MetricsSource> ret = null;

    synchronized (LockMetricSource.allInstances) {
      ret = new ArrayList<>(LockMetricSource.allInstances);
    }

    return ret;
  }
Returns a list with all created <code>MetricsSource</code> instances for
the R/W lock metrics. The returned list contains the instances that were
previously created via the <code>createLockMetricsSource</code> function.

@return A list of all R/W lock based metrics sources
llap-common/src/java/org/apache/hadoop/hive/llap/metrics/ReadWriteLockMetrics.java