public class NECVEPlugin extends Object implements DevicePlugin, DevicePluginScheduler
| Constructor and Description | 
|---|
| NECVEPlugin() | 
| Modifier and Type | Method and Description | 
|---|---|
| Set<Device> | allocateDevices(Set<Device> availableDevices,
               int count,
               Map<String,String> env)Called when allocating devices. | 
| Set<Device> | getDevices()Called when update node resource. | 
| DeviceRegisterRequest | getRegisterRequestInfo()Called first when device plugin framework wants to register. | 
| DeviceRuntimeSpec | onDevicesAllocated(Set<Device> set,
                  YarnRuntimeType yarnRuntimeType)Asking how these devices should be prepared/used
 before/when container launch. | 
| void | onDevicesReleased(Set<Device> releasedDevices)Called after device released. | 
public NECVEPlugin()
            throws ResourceHandlerException
ResourceHandlerExceptionpublic DeviceRegisterRequest getRegisterRequestInfo()
DevicePlugingetRegisterRequestInfo in interface DevicePluginDeviceRegisterRequestpublic Set<Device> getDevices()
DevicePlugingetDevices in interface DevicePluginDevice, TreeSet recommendedpublic DeviceRuntimeSpec onDevicesAllocated(Set<Device> set, YarnRuntimeType yarnRuntimeType)
DevicePluginVolumeSpec to let the
 framework to create volume before running container.onDevicesAllocated in interface DevicePluginset - A set of allocated Device.yarnRuntimeType - Indicate which runtime YARN will use
        Could be RUNTIME_DEFAULT or RUNTIME_DOCKER
        in DeviceRuntimeSpec constants. The default means YARN's
        non-docker container runtime is used. The docker means YARN's
        docker container runtime is used.DeviceRuntimeSpec description about environment,
 VolumeSpec, MountVolumeSpec. etcpublic void onDevicesReleased(Set<Device> releasedDevices)
DevicePluginonDevicesReleased in interface DevicePluginreleasedDevices - A set of released devicespublic Set<Device> allocateDevices(Set<Device> availableDevices, int count, Map<String,String> env)
DevicePluginSchedulerallocateDevices in interface DevicePluginScheduleravailableDevices - Devices allowed to be chosen from.count - Number of device to be allocated.env - Environment variables of the container.Device allocatedCopyright © 2008–2023 Apache Software Foundation. All rights reserved.