private static void sinkPropertiesSanityCheck()

in spark-operator/src/main/java/org/apache/spark/k8s/operator/metrics/MetricsSystemFactory.java [88:106]


  private static void sinkPropertiesSanityCheck(
      Map<String, MetricsSystem.SinkProperties> sinkPropsMap) {
    for (Map.Entry<String, MetricsSystem.SinkProperties> pair : sinkPropsMap.entrySet()) {
      // Each Sink should have mapping class full name
      if (StringUtils.isBlank(pair.getValue().className)) {
        String errorMessage =
            String.format(
                "%s provides properties, but does not provide full class name", pair.getKey());
        throw new IllegalStateException(errorMessage);
      }
      // Check the existence of each class full name
      try {
        Class.forName(pair.getValue().getClassName());
      } catch (ClassNotFoundException e) {
        throw new IllegalStateException(
            String.format("Fail to find class %s", pair.getValue().getClassName()), e);
      }
    }
  }