Class ExternalResourceUtils

java.lang.Object
org.apache.flink.runtime.externalresource.ExternalResourceUtils

public class ExternalResourceUtils extends Object
Utility class for external resource framework.
  • Method Details

    • getExternalResourceConfigurationKeys

      public static Map<String,String> getExternalResourceConfigurationKeys(org.apache.flink.configuration.Configuration config, String suffix)
      Get the external resource configuration keys map, indexed by the resource name. The configuration key should be used for deployment specific container request.
      Parameters:
      config - Configurations
      suffix - suffix of config option for deployment specific configuration key
      Returns:
      external resource configuration keys map, map the resource name to the configuration key for deployment * specific container request
    • createStaticExternalResourceInfoProviderFromConfig

      public static ExternalResourceInfoProvider createStaticExternalResourceInfoProviderFromConfig(org.apache.flink.configuration.Configuration configuration, org.apache.flink.core.plugin.PluginManager pluginManager)
      Instantiate StaticExternalResourceInfoProvider for all of enabled external resources.
    • getExternalResourcesCollection

      public static Collection<org.apache.flink.api.common.resources.ExternalResource> getExternalResourcesCollection(org.apache.flink.configuration.Configuration config)
      Get the collection of all enabled external resources.
    • generateExternalResourcesString

      public static String generateExternalResourcesString(Collection<org.apache.flink.api.common.resources.ExternalResource> extendedResources)
      Generate the string expression of the given external resources.