Class NECVEPlugin
java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.containermanager.resourceplugin.com.nec.NECVEPlugin
- All Implemented Interfaces:
DevicePlugin,DevicePluginScheduler
A device framework plugin which supports NEC Vector Engine.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCalled when allocating devices.Called when update node resource.Called first when device plugin framework wants to register.onDevicesAllocated(Set<Device> set, YarnRuntimeType yarnRuntimeType) Asking how these devices should be prepared/used before/when container launch.voidonDevicesReleased(Set<Device> releasedDevices) Called after device released.
-
Constructor Details
-
NECVEPlugin
- Throws:
ResourceHandlerException
-
-
Method Details
-
getRegisterRequestInfo
Description copied from interface:DevicePluginCalled first when device plugin framework wants to register.- Specified by:
getRegisterRequestInfoin interfaceDevicePlugin- Returns:
- DeviceRegisterRequest
DeviceRegisterRequest
-
getDevices
Description copied from interface:DevicePluginCalled when update node resource.- Specified by:
getDevicesin interfaceDevicePlugin- Returns:
- a set of
Device,TreeSetrecommended
-
onDevicesAllocated
Description copied from interface:DevicePluginAsking 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.- Specified by:
onDevicesAllocatedin interfaceDevicePlugin- Parameters:
set- A set of allocatedDevice.yarnRuntimeType- 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
-
onDevicesReleased
Description copied from interface:DevicePluginCalled after device released.- Specified by:
onDevicesReleasedin interfaceDevicePlugin- Parameters:
releasedDevices- A set of released devices
-
allocateDevices
Description copied from interface:DevicePluginSchedulerCalled when allocating devices. The framework will do all device book keeping and fail recovery. So this hook could be stateless and only do scheduling based on available devices passed in. It could be invoked multiple times by the framework. The hint in environment variables passed in could be potentially used in making better scheduling decision. For instance, GPU scheduling might support different kind of policy. The container can set it through environment variables.- Specified by:
allocateDevicesin interfaceDevicePluginScheduler- Parameters:
availableDevices- Devices allowed to be chosen from.count- Number of device to be allocated.env- Environment variables of the container.- Returns:
- A set of
Deviceallocated
-