Class ContainerVolumePublisher
java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.containermanager.volume.csi.ContainerVolumePublisher
Publish/un-publish CSI volumes on node manager.
-
Constructor Summary
ConstructorsConstructorDescriptionContainerVolumePublisher(Container container, String localMountRoot, OCIContainerRuntime runtime) -
Method Summary
Modifier and TypeMethodDescriptionIt first discovers the volume info from container resource; then negotiates with CSI driver adaptor to publish the volume on this node manager, on a specific directory under container's work dir; and then map the local mounted directory to volume target mount in the docker container.void
-
Constructor Details
-
ContainerVolumePublisher
public ContainerVolumePublisher(Container container, String localMountRoot, OCIContainerRuntime runtime)
-
-
Method Details
-
publishVolumes
public Map<String,String> publishVolumes() throws org.apache.hadoop.yarn.exceptions.YarnException, IOExceptionIt first discovers the volume info from container resource; then negotiates with CSI driver adaptor to publish the volume on this node manager, on a specific directory under container's work dir; and then map the local mounted directory to volume target mount in the docker container. CSI volume publish is a two phase work, by reaching up here we can assume the 1st phase is done on the RM side, which means YARN is already called the controller service of csi-driver to publish the volume; here we only need to call the node service of csi-driver to publish the volume on this local node manager.- Returns:
- a map where each key is the local mounted path on current node, and value is the remote mount path on the container.
- Throws:
org.apache.hadoop.yarn.exceptions.YarnExceptionIOException
-
unpublishVolumes
- Throws:
org.apache.hadoop.yarn.exceptions.YarnExceptionIOException
-