Package org.apache.flink.configuration
Class ExternalResourceOptions
- java.lang.Object
-
- org.apache.flink.configuration.ExternalResourceOptions
-
@PublicEvolving public class ExternalResourceOptions extends Object
Configuration options for external resources and external resource drivers.
-
-
Field Summary
Fields Modifier and Type Field Description static ConfigOption<Long>
EXTERNAL_RESOURCE_AMOUNT
The amount for the external resource specified by >resource_name< per TaskExecutor.static String
EXTERNAL_RESOURCE_AMOUNT_SUFFIX
The amount of the external resource per task executor.static ConfigOption<String>
EXTERNAL_RESOURCE_DRIVER_FACTORY_CLASS
Defines the factory class name for the external resource identified by >resource_name<.static String
EXTERNAL_RESOURCE_DRIVER_FACTORY_SUFFIX
The driver factory class of the external resource to use.static ConfigOption<String>
EXTERNAL_RESOURCE_DRIVER_PARAM
The naming pattern of custom config options for the external resource specified by >resource_name<.static String
EXTERNAL_RESOURCE_DRIVER_PARAM_SUFFIX
The suffix of custom config options' prefix for the external resource.static ConfigOption<List<String>>
EXTERNAL_RESOURCE_LIST
List of the resource_name of all external resources with delimiter ";", e.g.static String
NONE
Indicate an empty external resources list.
-
Constructor Summary
Constructors Constructor Description ExternalResourceOptions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
genericKeyWithSuffix(String suffix)
static String
getAmountConfigOptionForResource(String resourceName)
Generate the config option key for the amount of external resource with resource_name.static String
getExternalResourceDriverFactoryConfigOptionForResource(String resourceName)
Generate the config option key for the factory class name ofExternalResourceDriver
.static String
getExternalResourceParamConfigPrefixForResource(String resourceName)
Generate the suffix option key prefix for the user-defined params for external resources.static String
getSystemConfigKeyConfigOptionForResource(String resourceName, String suffix)
Generate the config option key for the configuration key of external resource in the deploying system.
-
-
-
Field Detail
-
EXTERNAL_RESOURCE_AMOUNT_SUFFIX
public static final String EXTERNAL_RESOURCE_AMOUNT_SUFFIX
The amount of the external resource per task executor. This is used as a suffix in an actual config.- See Also:
- Constant Field Values
-
NONE
public static final String NONE
Indicate an empty external resources list.- See Also:
- Constant Field Values
-
EXTERNAL_RESOURCE_DRIVER_FACTORY_SUFFIX
public static final String EXTERNAL_RESOURCE_DRIVER_FACTORY_SUFFIX
The driver factory class of the external resource to use. This is used as a suffix in an actual config.- See Also:
- Constant Field Values
-
EXTERNAL_RESOURCE_DRIVER_PARAM_SUFFIX
public static final String EXTERNAL_RESOURCE_DRIVER_PARAM_SUFFIX
The suffix of custom config options' prefix for the external resource.- See Also:
- Constant Field Values
-
EXTERNAL_RESOURCE_LIST
public static final ConfigOption<List<String>> EXTERNAL_RESOURCE_LIST
List of the resource_name of all external resources with delimiter ";", e.g. "gpu;fpga" for two external resource gpu and fpga. The resource_name will be used to splice related config options for external resource. Only the resource_name defined here will go into effect in external resource framework.Example:
external-resources = gpu;fpga external-resource.gpu.driver-factory.class: org.apache.flink.externalresource.gpu.GPUDriverFactory external-resource.gpu.amount: 2 external-resource.gpu.param.type: nvidia external-resource.fpga.driver-factory.class: org.apache.flink.externalresource.fpga.FPGADriverFactory external-resource.fpga.amount: 1
-
EXTERNAL_RESOURCE_DRIVER_FACTORY_CLASS
public static final ConfigOption<String> EXTERNAL_RESOURCE_DRIVER_FACTORY_CLASS
Defines the factory class name for the external resource identified by >resource_name<. The factory will be used to instantiate theExternalResourceDriver
at the TaskExecutor side.It is intentionally included into user docs while unused.
-
EXTERNAL_RESOURCE_AMOUNT
public static final ConfigOption<Long> EXTERNAL_RESOURCE_AMOUNT
The amount for the external resource specified by >resource_name< per TaskExecutor.It is intentionally included into user docs while unused.
-
EXTERNAL_RESOURCE_DRIVER_PARAM
public static final ConfigOption<String> EXTERNAL_RESOURCE_DRIVER_PARAM
The naming pattern of custom config options for the external resource specified by >resource_name<. Only the configurations that follow this pattern would be passed into the driver factory of that external resource.It is intentionally included into user docs while unused.
-
-
Method Detail
-
getAmountConfigOptionForResource
public static String getAmountConfigOptionForResource(String resourceName)
Generate the config option key for the amount of external resource with resource_name.
-
getSystemConfigKeyConfigOptionForResource
public static String getSystemConfigKeyConfigOptionForResource(String resourceName, String suffix)
Generate the config option key for the configuration key of external resource in the deploying system.
-
getExternalResourceDriverFactoryConfigOptionForResource
public static String getExternalResourceDriverFactoryConfigOptionForResource(String resourceName)
Generate the config option key for the factory class name ofExternalResourceDriver
.
-
-