Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-31508 FLIP-304: Pluggable failure handling for Apache Flink
  3. FLINK-33022

Log an error when enrichers defined as part of the configuration can not be found/loaded

    XMLWordPrintableJSON

Details

    Description

      if we configurate the `jobmanager.failure-enrichers`, but could not load the class in 
      FailureEnricherUtils, no exceptions can be seen in the log currently, and it is very inconvenient to check the problem. Here I suggest that some ERROR-level logs should be added, or an exception should be thrown directly (because the load cannot be uploaded is not an expected result)

      // code placeholder
      @VisibleForTesting
      static Collection<FailureEnricher> getFailureEnrichers(
              final Configuration configuration, final PluginManager pluginManager) {
          Set<String> includedEnrichers = getIncludedFailureEnrichers(configuration);
          LOG.info("includedEnrichers: {}", includedEnrichers);
          //  When empty, NO enrichers will be started.
          if (includedEnrichers.isEmpty()) {
              return Collections.emptySet();
          }
          // TODO: here maybe load nothing
          final Iterator<FailureEnricherFactory> factoryIterator =
                  pluginManager.load(FailureEnricherFactory.class);
          ....
      } 

       

      Attachments

        Issue Links

          Activity

            People

              pgaref Panagiotis Garefalakis
              wangm92 Matt Wang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: