Class CsiAdaptorFactory
java.lang.Object
org.apache.hadoop.yarn.csi.adaptor.CsiAdaptorFactory
Desired csi-adaptor implementation is configurable, default to
CsiAdaptorProtocolService. If user wants to have a different implementation,
just to configure a different class for the csi-driver.
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.hadoop.yarn.api.CsiAdaptorPlugingetAdaptor(String driverName, org.apache.hadoop.conf.Configuration conf) Load csi-driver-adaptor from configuration.
-
Method Details
-
getAdaptor
public static org.apache.hadoop.yarn.api.CsiAdaptorPlugin getAdaptor(String driverName, org.apache.hadoop.conf.Configuration conf) throws org.apache.hadoop.yarn.exceptions.YarnException Load csi-driver-adaptor from configuration. If the configuration is not specified, the default implementation for the adaptor isDefaultCsiAdaptorImpl. If the configured class is not a valid variation ofCsiAdaptorPluginor the class cannot be found, this function will throw a RuntimeException.- Parameters:
driverName-conf-- Returns:
- CsiAdaptorPlugin
- Throws:
org.apache.hadoop.yarn.exceptions.YarnException- if unable to create the adaptor class.RuntimeException- if given class is not found or not an instance ofCsiAdaptorPlugin
-