private boolean initCodahaleMetricsReporterClasses() {

    List<String> reporterClasses = Lists.newArrayList(Splitter.on(",").trimResults().
        omitEmptyStrings().split(MetastoreConf.getVar(conf,
        MetastoreConf.ConfVars.HIVE_CODAHALE_METRICS_REPORTER_CLASSES)));
    if (reporterClasses.isEmpty()) {
      return false;
    }

    // Removing duplicates from the list
    Set<String> reporterClassesSet = new HashSet<>(reporterClasses);
    for (String reporterClass : reporterClassesSet) {
      Class<?> name;
      try {
        name = conf.getClassByName(reporterClass);
      } catch (ClassNotFoundException e) {
        LOGGER.error("Unable to instantiate metrics reporter class " + reporterClass +
            " from conf HIVE_CODAHALE_METRICS_REPORTER_CLASSES", e);
        throw new IllegalArgumentException(e);
      }
      try {
        // Note: Hadoop metric reporter does not support tags. We create a single reporter for all metrics.
        Constructor<?> constructor = name.getConstructor(MetricRegistry.class, Configuration.class);
        CodahaleReporter reporter = (CodahaleReporter) constructor.newInstance(metricRegistry, conf);
        reporter.start();
        reporters.add(reporter);
        // hadoopMetricsStarted flag is set to true when Metrics2Reporter is initialised
        // so that we could gracefully shutdown DefaultMetricsSystem in close() method
        if (name.getName().equals(Metrics2Reporter.class.getName())) {
          hadoopMetricsStarted = true;
        }
      } catch (NoSuchMethodException | InstantiationException |
          IllegalAccessException | InvocationTargetException e) {
        LOGGER.error("Unable to instantiate using constructor(MetricRegistry, HiveConf) for"
            + " reporter " + reporterClass + " from conf HIVE_CODAHALE_METRICS_REPORTER_CLASSES",
            e);
        throw new IllegalArgumentException(e);
      }
    }
    return true;
  }
Initializes reporting using HIVE_CODAHALE_METRICS_REPORTER_CLASSES.
@return whether initialization was successful or not
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/common/metrics/metrics2/CodahaleMetrics.java