Class ExternalResourceUtils
- java.lang.Object
-
- org.apache.flink.runtime.externalresource.ExternalResourceUtils
-
public class ExternalResourceUtils extends Object
Utility class for external resource framework.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ExternalResourceInfoProvider
createStaticExternalResourceInfoProviderFromConfig(Configuration configuration, PluginManager pluginManager)
InstantiateStaticExternalResourceInfoProvider
for all of enabled external resources.static String
generateExternalResourcesString(Collection<ExternalResource> extendedResources)
Generate the string expression of the given external resources.static Map<String,String>
getExternalResourceConfigurationKeys(Configuration config, String suffix)
Get the external resource configuration keys map, indexed by the resource name.static Collection<ExternalResource>
getExternalResourcesCollection(Configuration config)
Get the collection of all enabled external resources.
-
-
-
Method Detail
-
getExternalResourceConfigurationKeys
public static Map<String,String> getExternalResourceConfigurationKeys(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
- Configurationssuffix
- 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(Configuration configuration, PluginManager pluginManager)
InstantiateStaticExternalResourceInfoProvider
for all of enabled external resources.
-
getExternalResourcesCollection
public static Collection<ExternalResource> getExternalResourcesCollection(Configuration config)
Get the collection of all enabled external resources.
-
generateExternalResourcesString
public static String generateExternalResourcesString(Collection<ExternalResource> extendedResources)
Generate the string expression of the given external resources.
-
-