Interface DevicePlugin
- All Known Implementing Classes:
NECVEPlugin,NvidiaGPUPluginForRuntimeV2
public interface DevicePlugin
A must interface for vendor plugin to implement.
-
Method Summary
Modifier and TypeMethodDescriptionCalled when update node resource.Called first when device plugin framework wants to register.onDevicesAllocated(Set<Device> allocatedDevices, YarnRuntimeType yarnRuntime) Asking how these devices should be prepared/used before/when container launch.voidonDevicesReleased(Set<Device> releasedDevices) Called after device released.
-
Method Details
-
getRegisterRequestInfo
Called first when device plugin framework wants to register.- Returns:
- DeviceRegisterRequest
DeviceRegisterRequest - Throws:
Exception
-
getDevices
Called when update node resource. -
onDevicesAllocated
DeviceRuntimeSpec onDevicesAllocated(Set<Device> allocatedDevices, YarnRuntimeType yarnRuntime) throws Exception Asking how these devices should be prepared/used before/when container launch. A plugin can do some tasks in its own or define it in DeviceRuntimeSpec to let the framework do it. For instance, defineVolumeSpecto let the framework to create volume before running container.- Parameters:
allocatedDevices- A set of allocatedDevice.yarnRuntime- Indicate which runtime YARN will use Could beRUNTIME_DEFAULTorRUNTIME_DOCKERinDeviceRuntimeSpecconstants. The default means YARN's non-docker container runtime is used. The docker means YARN's docker container runtime is used.- Returns:
- a
DeviceRuntimeSpecdescription about environment,VolumeSpec,MountVolumeSpec. etc - Throws:
Exception
-
onDevicesReleased
Called after device released.- Parameters:
releasedDevices- A set of released devices- Throws:
Exception
-