metrics/src/main/java/org/apache/calcite/avatica/metrics/MetricsSystemLoader.java [53:73]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    if (1 == availableFactories.size()) {
      // One and only one instance -- what we want/expect
      MetricsSystemFactory factory = availableFactories.get(0);
      LOG.info("Loaded MetricsSystem {}", factory.getClass());
      return factory.create(config);
    } else if (availableFactories.isEmpty()) {
      // None-provided default to no metrics
      LOG.info("No metrics implementation available on classpath. Using No-op implementation");
      return NoopMetricsSystem.getInstance();
    } else {
      // Tell the user they're doing something wrong, and choose the first impl.
      StringBuilder sb = new StringBuilder();
      for (MetricsSystemFactory factory : availableFactories) {
        if (sb.length() > 0) {
          sb.append(", ");
        }
        sb.append(factory.getClass());
      }
      LOG.warn("Found multiple MetricsSystemFactory implementations: {}."
          + " Using No-op implementation", sb);
      return NoopMetricsSystem.getInstance();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



server/src/main/java/org/apache/calcite/avatica/server/HandlerFactory.java [121:141]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    if (1 == availableFactories.size()) {
      // One and only one instance -- what we want
      MetricsSystemFactory factory = availableFactories.get(0);
      LOG.info("Loaded MetricsSystem {}", factory.getClass());
      return factory.create(config);
    } else if (availableFactories.isEmpty()) {
      // None-provided default to no metrics
      LOG.info("No metrics implementation available on classpath. Using No-op implementation");
      return NoopMetricsSystem.getInstance();
    } else {
      // Tell the user they're doing something wrong, and choose the first impl.
      StringBuilder sb = new StringBuilder();
      for (MetricsSystemFactory factory : availableFactories) {
        if (sb.length() > 0) {
          sb.append(", ");
        }
        sb.append(factory.getClass());
      }
      LOG.warn("Found multiple MetricsSystemFactory implementations: {}."
          + " Using No-op implementation", sb);
      return NoopMetricsSystem.getInstance();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



