YARN-9042. Fix javadoc error in deviceplugin package. Contributed by Zhankun Tang.

This commit is contained in:
Rohith Sharma K S 2018-11-22 17:39:06 +05:30
parent 95d526a270
commit e223a790a7
3 changed files with 8 additions and 3 deletions

View File

@ -53,7 +53,8 @@ public final class Device implements Serializable, Comparable {
private final int minorNumber;
/**
* PCI Bus ID in format [[[[<domain>]:]<bus>]:][<slot>][.[<func>]].
* PCI Bus ID in format.
* [[[[&lt;domain&gt;]:]&lt;bus&gt;]:][&lt;slot&gt;][.[&lt;func&gt;]].
* Optional. Can get from "lspci -D" in Linux
* */
private final String busID;

View File

@ -27,6 +27,7 @@ public interface DevicePlugin {
/**
* Called first when device plugin framework wants to register.
* @return DeviceRegisterRequest {@link DeviceRegisterRequest}
* @throws Exception
* */
DeviceRegisterRequest getRegisterRequestInfo()
throws Exception;
@ -34,6 +35,7 @@ DeviceRegisterRequest getRegisterRequestInfo()
/**
* Called when update node resource.
* @return a set of {@link Device}, {@link java.util.TreeSet} recommended
* @throws Exception
* */
Set<Device> getDevices() throws Exception;
@ -52,6 +54,7 @@ DeviceRegisterRequest getRegisterRequestInfo()
* docker container runtime is used.
* @return a {@link DeviceRuntimeSpec} description about environment,
* {@link VolumeSpec}, {@link MountVolumeSpec}. etc
* @throws Exception
* */
DeviceRuntimeSpec onDevicesAllocated(Set<Device> allocatedDevices,
YarnRuntimeType yarnRuntime) throws Exception;
@ -59,6 +62,7 @@ DeviceRuntimeSpec onDevicesAllocated(Set<Device> allocatedDevices,
/**
* Called after device released.
* @param releasedDevices A set of released devices
* @throws Exception
* */
void onDevicesReleased(Set<Device> releasedDevices)
throws Exception;

View File

@ -26,13 +26,13 @@
import java.util.TreeSet;
/**
* This is a spec used to prepare & run container.
* This is a spec used to prepare and run container.
* It's return value of onDeviceAllocated invoked by the framework.
* For preparation, if volumeSpecs is populated then the framework will
* create the volume before using the device
* When running container, the envs indicates environment variable needed.
* The containerRuntime indicates what Docker runtime to use.
* The volume & device mounts describes key isolation requirements
* The volume and device mounts describes key isolation requirements
* */
public final class DeviceRuntimeSpec implements Serializable {